summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ConnectionI.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2005-02-17 21:06:06 +0000
committerMark Spruiell <mes@zeroc.com>2005-02-17 21:06:06 +0000
commite403fe7460469856670e0ed6352a622b0b844cbc (patch)
tree0196b7c09a524db1e3a7480c9d012998b31c2445 /cpp/src/Ice/ConnectionI.cpp
parentfixing typo (diff)
downloadice-e403fe7460469856670e0ed6352a622b0b844cbc.tar.bz2
ice-e403fe7460469856670e0ed6352a622b0b844cbc.tar.xz
ice-e403fe7460469856670e0ed6352a622b0b844cbc.zip
shutdown write end of transceiver when connection is closed
Diffstat (limited to 'cpp/src/Ice/ConnectionI.cpp')
-rw-r--r--cpp/src/Ice/ConnectionI.cpp9
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;
}