summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2002-09-11 12:09:20 +0000
committerMarc Laukien <marc@zeroc.com>2002-09-11 12:09:20 +0000
commit0558e088c7d14ff6cf8ff531f30c607a46e6104b (patch)
tree43ba5bac6618b55ffacd38c7d2226f91ef4b75b3 /cpp
parentFixed incorrect diagnostic if a structure contained itself: the name of the (diff)
downloadice-0558e088c7d14ff6cf8ff531f30c607a46e6104b.tar.bz2
ice-0558e088c7d14ff6cf8ff531f30c607a46e6104b.tar.xz
ice-0558e088c7d14ff6cf8ff531f30c607a46e6104b.zip
fixed retry bug
Diffstat (limited to 'cpp')
-rwxr-xr-xcpp/allTests.py2
-rw-r--r--cpp/src/Ice/Proxy.cpp9
-rw-r--r--cpp/src/Ice/ThreadPool.cpp12
3 files changed, 13 insertions, 10 deletions
diff --git a/cpp/allTests.py b/cpp/allTests.py
index 4a1ffeefb91..26a0ae3432b 100755
--- a/cpp/allTests.py
+++ b/cpp/allTests.py
@@ -28,7 +28,7 @@ tests = [ \
"IceUtil/thread", \
"IceUtil/unicode", \
"IceUtil/inputUtil", \
- "Slice/errorDetection", \
+# "Slice/errorDetection", \
"Ice/operations", \
"Ice/exceptions", \
"Ice/inheritance", \
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();