summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ConnectionFactory.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2012-01-06 14:46:56 -0800
committerMark Spruiell <mes@zeroc.com>2012-01-06 14:46:56 -0800
commit82ab16f0eca2e1cd4f8897d7dea60d4dfe5526aa (patch)
tree9bd3e20e7e5d18ab0f3828c3047dccbf14632a83 /cpp/src/Ice/ConnectionFactory.cpp
parentICE-4471 Synchronization in Freeze MapI.java (diff)
downloadice-82ab16f0eca2e1cd4f8897d7dea60d4dfe5526aa.tar.bz2
ice-82ab16f0eca2e1cd4f8897d7dea60d4dfe5526aa.tar.xz
ice-82ab16f0eca2e1cd4f8897d7dea60d4dfe5526aa.zip
ICE-4701 - AsyncResult::getCommunicator returns null
Diffstat (limited to 'cpp/src/Ice/ConnectionFactory.cpp')
-rwxr-xr-xcpp/src/Ice/ConnectionFactory.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp
index ee201fd09cd..1d44f74d755 100755
--- a/cpp/src/Ice/ConnectionFactory.cpp
+++ b/cpp/src/Ice/ConnectionFactory.cpp
@@ -120,6 +120,7 @@ IceInternal::OutgoingConnectionFactory::destroy()
#endif
_destroyed = true;
+ _communicator = 0;
notifyAll();
}
@@ -437,7 +438,9 @@ IceInternal::OutgoingConnectionFactory::flushAsyncBatchRequests(const Communicat
}
}
-IceInternal::OutgoingConnectionFactory::OutgoingConnectionFactory(const InstancePtr& instance) :
+IceInternal::OutgoingConnectionFactory::OutgoingConnectionFactory(const CommunicatorPtr& communicator,
+ const InstancePtr& instance) :
+ _communicator(communicator),
_instance(instance),
_reaper(new ConnectionReaper()),
_destroyed(false),
@@ -675,7 +678,8 @@ IceInternal::OutgoingConnectionFactory::createConnection(const TransceiverPtr& t
throw Ice::CommunicatorDestroyedException(__FILE__, __LINE__);
}
- connection = new ConnectionI(_instance, _reaper, transceiver, ci.connector, ci.endpoint->compress(false), 0);
+ connection = new ConnectionI(_communicator, _instance, _reaper, transceiver, ci.connector,
+ ci.endpoint->compress(false), 0);
}
catch(const Ice::LocalException&)
{
@@ -1420,7 +1424,8 @@ IceInternal::IncomingConnectionFactory::message(ThreadPoolCurrent& current)
try
{
- connection = new ConnectionI(_instance, _reaper, transceiver, 0, _endpoint, _adapter);
+ connection = new ConnectionI(_adapter->getCommunicator(), _instance, _reaper, transceiver, 0, _endpoint,
+ _adapter);
}
catch(const LocalException& ex)
{
@@ -1551,7 +1556,8 @@ IceInternal::IncomingConnectionFactory::initialize(const string& oaName)
const_cast<TransceiverPtr&>(_transceiver) = _endpoint->transceiver(const_cast<EndpointIPtr&>(_endpoint));
if(_transceiver)
{
- ConnectionIPtr connection = new ConnectionI(_instance, _reaper, _transceiver, 0, _endpoint, _adapter);
+ ConnectionIPtr connection = new ConnectionI(_adapter->getCommunicator(), _instance, _reaper, _transceiver,
+ 0, _endpoint, _adapter);
connection->start(0);
_connections.insert(connection);
}