diff options
author | Marc Laukien <marc@zeroc.com> | 2003-03-23 18:29:59 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2003-03-23 18:29:59 +0000 |
commit | fe91778f28a3f7680117d8791b9418f7d342fe57 (patch) | |
tree | 9e5316498c2125206b02650385335f69f4a2e69f /cpp/src/Ice/Connection.cpp | |
parent | shutdown fix (diff) | |
download | ice-fe91778f28a3f7680117d8791b9418f7d342fe57.tar.bz2 ice-fe91778f28a3f7680117d8791b9418f7d342fe57.tar.xz ice-fe91778f28a3f7680117d8791b9418f7d342fe57.zip |
close timeout
Diffstat (limited to 'cpp/src/Ice/Connection.cpp')
-rw-r--r-- | cpp/src/Ice/Connection.cpp | 8 |
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); |