diff options
author | Matthew Newhook <matthew@zeroc.com> | 2014-07-10 17:17:55 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2014-07-10 17:17:55 -0230 |
commit | 9326917abfa8ebd9815e192db2dd57cd8e85179d (patch) | |
tree | 26045ee4f12e9eab55cbeaefb6a3855ac16d6f50 /cpp/src/Ice/ConnectRequestHandler.cpp | |
parent | Partial fix for ICE-5548: better C++11 detection (diff) | |
download | ice-9326917abfa8ebd9815e192db2dd57cd8e85179d.tar.bz2 ice-9326917abfa8ebd9815e192db2dd57cd8e85179d.tar.xz ice-9326917abfa8ebd9815e192db2dd57cd8e85179d.zip |
ICE-5573 - .NET TimeoutException ignores Dispatcher
- Added test for C++, C# & Java to the dispatcher test
to ensure that the invocation timeout is throwin
in the correct thread.
- Pass the connection to the dispatcher invocation in
more cases.
Diffstat (limited to 'cpp/src/Ice/ConnectRequestHandler.cpp')
-rw-r--r-- | cpp/src/Ice/ConnectRequestHandler.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/cpp/src/Ice/ConnectRequestHandler.cpp b/cpp/src/Ice/ConnectRequestHandler.cpp index 7ff4609d924..c3b4a4b160d 100644 --- a/cpp/src/Ice/ConnectRequestHandler.cpp +++ b/cpp/src/Ice/ConnectRequestHandler.cpp @@ -29,7 +29,8 @@ class FlushRequestsWithException : public DispatchWorkItem { public: - FlushRequestsWithException(const ConnectRequestHandlerPtr& handler) : _handler(handler) + FlushRequestsWithException(const Ice::ConnectionPtr& connection, const ConnectRequestHandlerPtr& handler) : + DispatchWorkItem(connection), _handler(handler) { } @@ -48,7 +49,8 @@ class FlushSentRequests : public DispatchWorkItem { public: - FlushSentRequests(const vector<OutgoingAsyncMessageCallbackPtr>& callbacks) : _callbacks(callbacks) + FlushSentRequests(const Ice::ConnectionPtr& connection, const vector<OutgoingAsyncMessageCallbackPtr>& callbacks) : + DispatchWorkItem(connection), _callbacks(callbacks) { } @@ -367,7 +369,7 @@ ConnectRequestHandler::setException(const Ice::LocalException& ex) // if(!_requests.empty()) { - _reference->getInstance()->clientThreadPool()->execute(new FlushRequestsWithException(this)); + _reference->getInstance()->clientThreadPool()->execute(new FlushRequestsWithException(_connection, this)); } notifyAll(); @@ -483,19 +485,19 @@ ConnectRequestHandler::flushRequests() Lock sync(*this); assert(!_exception.get() && !_requests.empty()); _exception.reset(ex.get()->ice_clone()); - _reference->getInstance()->clientThreadPool()->execute(new FlushRequestsWithException(this)); + _reference->getInstance()->clientThreadPool()->execute(new FlushRequestsWithException(_connection, this)); } catch(const Ice::LocalException& ex) { Lock sync(*this); assert(!_exception.get() && !_requests.empty()); _exception.reset(ex.ice_clone()); - _reference->getInstance()->clientThreadPool()->execute(new FlushRequestsWithException(this)); + _reference->getInstance()->clientThreadPool()->execute(new FlushRequestsWithException(_connection, this)); } if(!sentCallbacks.empty()) { - _reference->getInstance()->clientThreadPool()->execute(new FlushSentRequests(sentCallbacks)); + _reference->getInstance()->clientThreadPool()->execute(new FlushSentRequests(_connection, sentCallbacks)); } // |