diff options
author | Marc Laukien <marc@zeroc.com> | 2002-04-02 16:55:15 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-04-02 16:55:15 +0000 |
commit | 7a589cb97a18ad905339a20824fe5b0bfc90cc9f (patch) | |
tree | f65567a89f46899885dc995324e10368825902d2 /cpp/src/Ice/Connection.cpp | |
parent | initial clean-up (diff) | |
download | ice-7a589cb97a18ad905339a20824fe5b0bfc90cc9f.tar.bz2 ice-7a589cb97a18ad905339a20824fe5b0bfc90cc9f.tar.xz ice-7a589cb97a18ad905339a20824fe5b0bfc90cc9f.zip |
finished() fixes
Diffstat (limited to 'cpp/src/Ice/Connection.cpp')
-rw-r--r-- | cpp/src/Ice/Connection.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/cpp/src/Ice/Connection.cpp b/cpp/src/Ice/Connection.cpp index 8dda6a9abb0..01ecb5fe6e5 100644 --- a/cpp/src/Ice/Connection.cpp +++ b/cpp/src/Ice/Connection.cpp @@ -293,11 +293,10 @@ IceInternal::Connection::message(BasicStream& stream) if (_state == StateClosed) { - ::IceUtil::ThreadControl::yield(); + IceUtil::ThreadControl::yield(); return; } - Byte messageType; try @@ -535,18 +534,22 @@ IceInternal::Connection::message(BasicStream& stream) } void -IceInternal::Connection::exception(const LocalException& ex) +IceInternal::Connection::finished() { IceUtil::RecMutex::Lock sync(*this); - setState(StateClosed, ex); + + _threadPool->promoteFollower(); + + assert(_state == StateClosed); + + _transceiver->close(); } void -IceInternal::Connection::finished() +IceInternal::Connection::exception(const LocalException& ex) { IceUtil::RecMutex::Lock sync(*this); - assert(_state == StateClosed); - _transceiver->close(); + setState(StateClosed, ex); } /* |