diff options
author | Benoit Foucher <benoit@zeroc.com> | 2008-01-11 09:53:14 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2008-01-11 09:53:14 +0100 |
commit | 2c9815764bf671fa936d61d62f9c45c588d8a948 (patch) | |
tree | 8381aa5c12390b598ffd2d3fe2ca199a51a32097 /cpp/src/Ice/ConnectRequestHandler.cpp | |
parent | Fixed bug #2626 (diff) | |
download | ice-2c9815764bf671fa936d61d62f9c45c588d8a948.tar.bz2 ice-2c9815764bf671fa936d61d62f9c45c588d8a948.tar.xz ice-2c9815764bf671fa936d61d62f9c45c588d8a948.zip |
Fixed race condition in ConnectRequestHandler
Diffstat (limited to 'cpp/src/Ice/ConnectRequestHandler.cpp')
-rw-r--r-- | cpp/src/Ice/ConnectRequestHandler.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/cpp/src/Ice/ConnectRequestHandler.cpp b/cpp/src/Ice/ConnectRequestHandler.cpp index d334c1b6c3f..3d70c200d3e 100644 --- a/cpp/src/Ice/ConnectRequestHandler.cpp +++ b/cpp/src/Ice/ConnectRequestHandler.cpp @@ -432,14 +432,6 @@ ConnectRequestHandler::flushRequests() return; } - { - Lock sync(*this); - assert(!_initialized); - _initialized = true; - _flushing = false; - notifyAll(); - } - // // We've finished sending the queued requests and the request handler now send // the requests over the connection directly. It's time to substitute the @@ -451,8 +443,16 @@ ConnectRequestHandler::flushRequests() { _proxy->__setRequestHandler(_delegate, new ConnectionRequestHandler(_reference, _connection, _compress)); } - _proxy = 0; // Break cyclic reference count. - _delegate = 0; // Break cyclic reference count. + + { + Lock sync(*this); + assert(!_initialized); + _initialized = true; + _flushing = false; + _proxy = 0; // Break cyclic reference count. + _delegate = 0; // Break cyclic reference count. + notifyAll(); + } } void |