From c9c526613467e51d27bcdf16dc740948d292fc3c Mon Sep 17 00:00:00 2001 From: Mark Spruiell Date: Wed, 7 Feb 2007 00:21:33 +0000 Subject: bug 1718 - race condition in ConnectionI destructor for thread-per-connection --- cpp/src/Ice/ConnectionFactory.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cpp/src/Ice/ConnectionFactory.cpp') 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& 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&) { -- cgit v1.2.3