summaryrefslogtreecommitdiff
path: root/cppe/src
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2005-12-22 17:12:38 +0000
committerDwayne Boone <dwayne@zeroc.com>2005-12-22 17:12:38 +0000
commit003e7126c49d35af6ed06dd3b018cd95707b1562 (patch)
tree4e8052633ef57a8f9a49a4d9d1edd28408478777 /cppe/src
parentMinor fixes (diff)
downloadice-003e7126c49d35af6ed06dd3b018cd95707b1562.tar.bz2
ice-003e7126c49d35af6ed06dd3b018cd95707b1562.tar.xz
ice-003e7126c49d35af6ed06dd3b018cd95707b1562.zip
Fixed deadlock condition
Diffstat (limited to 'cppe/src')
-rwxr-xr-xcppe/src/IceE/Connection.cpp63
1 files changed, 32 insertions, 31 deletions
diff --git a/cppe/src/IceE/Connection.cpp b/cppe/src/IceE/Connection.cpp
index 8899ce2bee7..239b0e62771 100755
--- a/cppe/src/IceE/Connection.cpp
+++ b/cppe/src/IceE/Connection.cpp
@@ -382,48 +382,49 @@ Ice::Connection::sendBlockingRequest(BasicStream* os, BasicStream* is, Outgoing*
try
{
- IceUtil::Mutex::Lock sendSync(_sendMutex);
- sendRequest(os);
+ {
+ IceUtil::Mutex::Lock sendSync(_sendMutex);
+ sendRequest(os);
+
+ if(out)
+ {
+ readStream(*is);
+ }
+ }
if(out)
{
- readStream(*is);
+ IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
-#ifndef ICEE_PURE_CLIENT
- Int invokeNum = 0;
- ServantManagerPtr servantManager;
- ObjectAdapterPtr adapter;
-#endif
-
+ if(_state != StateClosed)
{
- IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
-
- if(_state != StateClosed)
- {
#ifndef ICEE_PURE_CLIENT
- parseMessage(*is, requestId, invokeNum, servantManager, adapter);
+ Int invokeNum = 0;
+ ServantManagerPtr servantManager;
+ ObjectAdapterPtr adapter;
+
+ parseMessage(*is, requestId, invokeNum, servantManager, adapter);
#else
- parseMessage(*is, requestId);
+ parseMessage(*is, requestId);
#endif
- }
+ }
- //
- // parseMessage() can close the connection, so we must
- // check for closed state again.
- //
- if(_state == StateClosed)
+ //
+ // parseMessage() can close the connection, so we must
+ // check for closed state again.
+ //
+ if(_state == StateClosed)
+ {
+ try
{
- try
- {
- _transceiver->close();
- }
- catch(const LocalException&)
- {
- }
-
- _transceiver = 0;
- out->finished(*_exception.get());
+ _transceiver->close();
}
+ catch(const LocalException&)
+ {
+ }
+
+ _transceiver = 0;
+ out->finished(*_exception.get());
}
}
}