diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-03-03 14:10:40 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-03-03 14:10:40 +0000 |
commit | e642c24a430dc350b3b14b5a925376084f8a7602 (patch) | |
tree | c494bf31e6c52a327e46a47e4fdf0e98872c6784 /cppe/src/IceE/Connection.cpp | |
parent | Fix (diff) | |
download | ice-e642c24a430dc350b3b14b5a925376084f8a7602.tar.bz2 ice-e642c24a430dc350b3b14b5a925376084f8a7602.tar.xz ice-e642c24a430dc350b3b14b5a925376084f8a7602.zip |
Ported fix for bug 574 and retry test
Diffstat (limited to 'cppe/src/IceE/Connection.cpp')
-rwxr-xr-x | cppe/src/IceE/Connection.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/cppe/src/IceE/Connection.cpp b/cppe/src/IceE/Connection.cpp index 9c036b1b9a5..12ae0772a23 100755 --- a/cppe/src/IceE/Connection.cpp +++ b/cppe/src/IceE/Connection.cpp @@ -198,6 +198,18 @@ Ice::Connection::isFinished() const return true; } +void +Ice::Connection::throwException() const +{ + IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); + + if(_exception.get()) + { + assert(_state >= StateClosing); + _exception->ice_throw(); + } +} + #ifndef ICEE_PURE_CLIENT void @@ -303,7 +315,12 @@ Ice::Connection::sendRequest(BasicStream* os, Outgoing* out) if(!_transceiver) { assert(_exception.get()); - _exception->ice_throw(); + // + // If the connection is closed before we even have a chance + // to send our request, we always try to send the request + // again. + // + throw LocalExceptionWrapper(*_exception.get(), true); } Int requestId; |