diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/Ice/ConnectionI.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp index 75712477aec..63d5c26e46a 100644 --- a/cpp/src/Ice/ConnectionI.cpp +++ b/cpp/src/Ice/ConnectionI.cpp @@ -1671,6 +1671,15 @@ Ice::ConnectionI::setState(State state) // registerWithPool(); unregisterWithPool(); + + // + // We must prevent any further writes when _state == StateClosed. + // However, functions such as sendResponse cannot acquire the main + // mutex in order to check _state. Therefore we shut down the write + // end of the transceiver, which causes subsequent write attempts + // to fail with an exception. + // + _transceiver->shutdownWrite(); } break; } |