summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ConnectionI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/ConnectionI.cpp')
-rw-r--r--cpp/src/Ice/ConnectionI.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp
index 9601398ac5d..9e1bbe09e7a 100644
--- a/cpp/src/Ice/ConnectionI.cpp
+++ b/cpp/src/Ice/ConnectionI.cpp
@@ -1525,7 +1525,17 @@ Ice::ConnectionI::setState(State state)
case StateClosed:
{
- if(_state == StateNotValidated)
+ if(_instance->threadPerConnection())
+ {
+ //
+ // If we are in thread per connection mode, we
+ // shutdown both for reading and writing. This will
+ // unblock and read call with an exception. The thread
+ // per connection then closes the transceiver.
+ //
+ _transceiver->shutdownReadWrite();
+ }
+ else if(_state == StateNotValidated)
{
//
// If we change from not validated we can close right
@@ -1551,16 +1561,6 @@ Ice::ConnectionI::setState(State state)
_transceiver = 0;
//notifyAll(); // We notify already below.
}
- else if(_instance->threadPerConnection())
- {
- //
- // If we are in thread per connection mode, we
- // shutdown both for reading and writing. This will
- // unblock and read call with an exception. The thread
- // per connection then closes the transceiver.
- //
- _transceiver->shutdownReadWrite();
- }
else
{
//