diff options
author | Marc Laukien <marc@zeroc.com> | 2002-09-11 12:09:20 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-09-11 12:09:20 +0000 |
commit | 0558e088c7d14ff6cf8ff531f30c607a46e6104b (patch) | |
tree | 43ba5bac6618b55ffacd38c7d2226f91ef4b75b3 /cpp/src | |
parent | Fixed incorrect diagnostic if a structure contained itself: the name of the (diff) | |
download | ice-0558e088c7d14ff6cf8ff531f30c607a46e6104b.tar.bz2 ice-0558e088c7d14ff6cf8ff531f30c607a46e6104b.tar.xz ice-0558e088c7d14ff6cf8ff531f30c607a46e6104b.zip |
fixed retry bug
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/Proxy.cpp | 9 | ||||
-rw-r--r-- | cpp/src/Ice/ThreadPool.cpp | 12 |
2 files changed, 12 insertions, 9 deletions
diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp index cd770ba8239..56ed69ad2aa 100644 --- a/cpp/src/Ice/Proxy.cpp +++ b/cpp/src/Ice/Proxy.cpp @@ -579,14 +579,7 @@ IceProxy::Ice::Object::__handleException(const LocalException& ex, int& cnt) } catch(const CloseConnectionException&) { - // - // We always retry on a close connection exception, as this - // indicates graceful server shutdown. - // - // TODO: ML: Perhaps we should have a limit on this too? - // Otherwise a rogue server could let the client retry - // forever. - // + ++cnt; } catch(const SocketException&) { diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp index 60d75341c32..d09c86fbe58 100644 --- a/cpp/src/Ice/ThreadPool.cpp +++ b/cpp/src/Ice/ThreadPool.cpp @@ -55,6 +55,10 @@ IceInternal::ThreadPool::promoteFollower() void IceInternal::ThreadPool::initiateShutdown() { + // + // This operation must be signal safe, so all we can do is to set + // an interrupt. + // setInterrupt(1); } @@ -262,7 +266,13 @@ IceInternal::ThreadPool::run() repeatSelect: - if(shutdown) // Shutdown has been initiated. + // + // We must shut down the object adapter factory. We cannot do + // this in initiateShutdown(), because this method must be + // signal safe. We also cannot do this within the + // synchronization of this object, so we do it here. + // + if(shutdown) { shutdown = false; ObjectAdapterFactoryPtr factory = _instance->objectAdapterFactory(); |