diff options
author | Mark Spruiell <mes@zeroc.com> | 2007-02-07 00:21:33 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2007-02-07 00:21:33 +0000 |
commit | c9c526613467e51d27bcdf16dc740948d292fc3c (patch) | |
tree | 70ca1bf9c86e5009009905aec7ee98b62b16cc7e /cpp/src/Ice/ConnectionFactory.cpp | |
parent | bug fix (diff) | |
download | ice-c9c526613467e51d27bcdf16dc740948d292fc3c.tar.bz2 ice-c9c526613467e51d27bcdf16dc740948d292fc3c.tar.xz ice-c9c526613467e51d27bcdf16dc740948d292fc3c.zip |
bug 1718 - race condition in ConnectionI destructor for
thread-per-connection
Diffstat (limited to 'cpp/src/Ice/ConnectionFactory.cpp')
-rw-r--r-- | cpp/src/Ice/ConnectionFactory.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp index 3008dfaa485..aa5d713a623 100644 --- a/cpp/src/Ice/ConnectionFactory.cpp +++ b/cpp/src/Ice/ConnectionFactory.cpp @@ -294,6 +294,7 @@ IceInternal::OutgoingConnectionFactory::create(const vector<EndpointIPtr>& endpt } connection = new ConnectionI(_instance, transceiver, endpoint, 0, threadPerConnection, _instance->threadPerConnectionStackSize()); + connection->start(); connection->validate(); if(_instance->defaultsAndOverrides()->overrideCompress) @@ -762,8 +763,9 @@ IceInternal::IncomingConnectionFactory::message(BasicStream&, const ThreadPoolPt try { - connection = new ConnectionI(_instance, transceiver, _endpoint, _adapter, _threadPerConnection, - _threadPerConnectionStackSize); + assert(!_threadPerConnection); + connection = new ConnectionI(_instance, transceiver, _endpoint, _adapter, false, 0); + connection->start(); } catch(const LocalException&) { @@ -872,6 +874,7 @@ IceInternal::IncomingConnectionFactory::IncomingConnectionFactory(const Instance { connection = new ConnectionI(_instance, _transceiver, _endpoint, _adapter, _threadPerConnection, _threadPerConnectionStackSize); + connection->start(); connection->validate(); } catch(const LocalException&) @@ -1144,6 +1147,7 @@ IceInternal::IncomingConnectionFactory::run() { connection = new ConnectionI(_instance, transceiver, _endpoint, _adapter, _threadPerConnection, _threadPerConnectionStackSize); + connection->start(); } catch(const LocalException&) { |