diff options
author | Marc Laukien <marc@zeroc.com> | 2004-11-02 16:45:20 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2004-11-02 16:45:20 +0000 |
commit | f7d9b38d5dba483cfe0a0069f3cfc4674c7984b2 (patch) | |
tree | af7955b71e82245c961f60165416a35f663bc75b /cpp/src/Ice/ConnectionI.cpp | |
parent | fix (diff) | |
download | ice-f7d9b38d5dba483cfe0a0069f3cfc4674c7984b2.tar.bz2 ice-f7d9b38d5dba483cfe0a0069f3cfc4674c7984b2.tar.xz ice-f7d9b38d5dba483cfe0a0069f3cfc4674c7984b2.zip |
Connection::close
Diffstat (limited to 'cpp/src/Ice/ConnectionI.cpp')
-rw-r--r-- | cpp/src/Ice/ConnectionI.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp index eefd1265b90..492bb72c398 100644 --- a/cpp/src/Ice/ConnectionI.cpp +++ b/cpp/src/Ice/ConnectionI.cpp @@ -209,9 +209,14 @@ void Ice::ConnectionI::close(bool force) { IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - - - + if(force) + { + setState(StateClosed, ForcedCloseConnectionException(__FILE__, __LINE__)); + } + else + { + setState(StateClosing, CloseConnectionException(__FILE__, __LINE__)); + } } bool @@ -1479,6 +1484,7 @@ Ice::ConnectionI::setState(State state, const LocalException& ex) // Don't warn about certain expected exceptions. // if(!(dynamic_cast<const CloseConnectionException*>(_exception.get()) || + dynamic_cast<const ForcedCloseConnectionException*>(_exception.get()) || dynamic_cast<const ConnectionTimeoutException*>(_exception.get()) || dynamic_cast<const CommunicatorDestroyedException*>(_exception.get()) || dynamic_cast<const ObjectAdapterDeactivatedException*>(_exception.get()) || |