summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/Connection.cpp')
-rw-r--r--cpp/src/Ice/Connection.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/cpp/src/Ice/Connection.cpp b/cpp/src/Ice/Connection.cpp
index 1e8d9020fd9..21a74876acd 100644
--- a/cpp/src/Ice/Connection.cpp
+++ b/cpp/src/Ice/Connection.cpp
@@ -99,13 +99,17 @@ IceInternal::Connection::waitUntilHolding() const
}
void
-IceInternal::Connection::waitUntilFinished() const
+IceInternal::Connection::waitUntilFinished()
{
IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
while(_transceiver || _dispatchCount > 0)
{
- wait();
+ if(timedWait(IceUtil::Time::milliSeconds(_endpoint->timeout())))
+ {
+ setState(StateClosed, CloseTimeoutException(__FILE__, __LINE__));
+ // No return here, we must still wait until _transceiver becomes null.
+ }
}
assert(_state == StateClosed);