diff options
author | Benoit Foucher <benoit@zeroc.com> | 2007-12-12 18:54:19 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2007-12-12 18:54:19 +0100 |
commit | 3dff2b82d498d2e29dc4c42c4053557e16a373d4 (patch) | |
tree | 4242da8678ce8f36e34b9d821212cf78519af415 /cpp/src/Ice/ConnectionFactory.h | |
parent | Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice (diff) | |
download | ice-3dff2b82d498d2e29dc4c42c4053557e16a373d4.tar.bz2 ice-3dff2b82d498d2e29dc4c42c4053557e16a373d4.tar.xz ice-3dff2b82d498d2e29dc4c42c4053557e16a373d4.zip |
Fixed bug 2592
Diffstat (limited to 'cpp/src/Ice/ConnectionFactory.h')
-rw-r--r-- | cpp/src/Ice/ConnectionFactory.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/cpp/src/Ice/ConnectionFactory.h b/cpp/src/Ice/ConnectionFactory.h index 1c2c3349a42..14a62ce3d2c 100644 --- a/cpp/src/Ice/ConnectionFactory.h +++ b/cpp/src/Ice/ConnectionFactory.h @@ -83,8 +83,7 @@ private: bool threadPerConnection; }; - class ConnectCallback : public Ice::ConnectionI::StartCallback, public IceInternal::EndpointI_connectors, - public IceInternal::ThreadPoolWorkItem + class ConnectCallback : public Ice::ConnectionI::StartCallback, public IceInternal::EndpointI_connectors { public: @@ -97,7 +96,8 @@ private: virtual void connectors(const std::vector<ConnectorPtr>&); virtual void exception(const Ice::LocalException&); - virtual void execute(const ThreadPoolPtr&); + void getConnectors(); + void nextEndpoint(); void getConnection(); void nextConnector(); @@ -105,8 +105,6 @@ private: bool operator<(const ConnectCallback&) const; private: - - void handleException(); const OutgoingConnectionFactoryPtr _factory; const SelectorThreadPtr _selectorThread; @@ -118,16 +116,14 @@ private: std::vector<EndpointIPtr>::const_iterator _endpointsIter; std::vector<ConnectorInfo> _connectors; std::vector<ConnectorInfo>::const_iterator _iter; - std::auto_ptr<Ice::LocalException> _exception; - Ice::ConnectionIPtr _connection; }; typedef IceUtil::Handle<ConnectCallback> ConnectCallbackPtr; friend class ConnectCallback; std::vector<EndpointIPtr> applyOverrides(const std::vector<EndpointIPtr>&); Ice::ConnectionIPtr findConnection(const std::vector<EndpointIPtr>&, bool, bool&); - void addPendingEndpoints(const std::vector<EndpointIPtr>&); - void removePendingEndpoints(const std::vector<EndpointIPtr>&); + void incPendingConnectCount(); + void decPendingConnectCount(); Ice::ConnectionIPtr getConnection(const std::vector<ConnectorInfo>&, const ConnectCallbackPtr&, bool&); void finishGetConnection(const std::vector<ConnectorInfo>&, const ConnectCallbackPtr&, const Ice::ConnectionIPtr&); Ice::ConnectionIPtr findConnection(const std::vector<ConnectorInfo>&, bool&); @@ -143,7 +139,7 @@ private: std::map<ConnectorInfo, std::set<ConnectCallbackPtr> > _pending; std::multimap<EndpointIPtr, Ice::ConnectionIPtr> _connectionsByEndpoint; - std::multiset<EndpointIPtr> _pendingEndpoints; + int _pendingConnectCount; }; class IncomingConnectionFactory : public EventHandler, |