summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2003-09-26 20:21:03 +0000
committerMarc Laukien <marc@zeroc.com>2003-09-26 20:21:03 +0000
commit05740d83942c90764ddf9825c8abcd14069617a4 (patch)
treee9d93698bc71dac7a0871edf1f8f1cdccfb393b4 /cpp/src
parentFixed minor bugs (diff)
downloadice-05740d83942c90764ddf9825c8abcd14069617a4.tar.bz2
ice-05740d83942c90764ddf9825c8abcd14069617a4.tar.xz
ice-05740d83942c90764ddf9825c8abcd14069617a4.zip
fix
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/ConnectionFactory.cpp43
1 files changed, 27 insertions, 16 deletions
diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp
index 1d6227ecd81..12bd9493791 100644
--- a/cpp/src/Ice/ConnectionFactory.cpp
+++ b/cpp/src/Ice/ConnectionFactory.cpp
@@ -384,6 +384,7 @@ void
IceInternal::OutgoingConnectionFactory::flushBatchRequests()
{
list<ConnectionPtr> c;
+
{
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
@@ -394,7 +395,18 @@ IceInternal::OutgoingConnectionFactory::flushBatchRequests()
c.push_back(p->second);
}
}
- for_each(c.begin(), c.end(), Ice::voidMemFun(&Connection::flushBatchRequest));
+
+ for(list<ConnectionPtr>::const_iterator p = c.begin(); p != c.end(); ++p)
+ {
+ try
+ {
+ (*p)->flushBatchRequest();
+ }
+ catch(const LocalException&)
+ {
+ // Ignore.
+ }
+ }
}
IceInternal::OutgoingConnectionFactory::OutgoingConnectionFactory(const InstancePtr& instance) :
@@ -510,26 +522,25 @@ IceInternal::IncomingConnectionFactory::connections() const
return result;
}
-namespace IceInternal {
-
-struct FlushIfValidated
+void
+IceInternal::IncomingConnectionFactory::flushBatchRequests()
{
- void operator() (ConnectionPtr p)
+ list<ConnectionPtr> c = connections(); // connections() is synchronized, so no need to synchronize here.
+
+ for(list<ConnectionPtr>::const_iterator p = c.begin(); p != c.end(); ++p)
{
- if(p->isValidated())
+ if((*p)->isValidated())
{
- p->flushBatchRequest();
+ try
+ {
+ (*p)->flushBatchRequest();
+ }
+ catch(const LocalException&)
+ {
+ // Ignore.
+ }
}
}
-};
-
-}
-
-void
-IceInternal::IncomingConnectionFactory::flushBatchRequests()
-{
- list<ConnectionPtr> c = connections(); // connections() is synchronized, so no need to synchronize here.
- for_each(c.begin(), c.end(), FlushIfValidated());
}
bool