Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 648218 Details for
Bug 874192
Deadlock in Qpid client if connection heartbeat is missed
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed fix
bz874192.patch (text/plain), 3.59 KB, created by
Andrew Stitcher
on 2012-11-20 00:24:00 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Andrew Stitcher
Created:
2012-11-20 00:24:00 UTC
Size:
3.59 KB
patch
obsolete
>diff --git a/qpid/cpp/src/qpid/client/TCPConnector.cpp b/qpid/cpp/src/qpid/client/TCPConnector.cpp >index b92f342..7837427 100644 >--- a/qpid/cpp/src/qpid/client/TCPConnector.cpp >+++ b/qpid/cpp/src/qpid/client/TCPConnector.cpp >@@ -151,6 +151,11 @@ void TCPConnector::socketClosed(AsynchIO&, const Socket&) { > shutdownHandler->shutdown(); > } > >+void TCPConnector::connectAborted() { >+ connector->stop(); >+ connectFailed("Connection timedout"); >+} >+ > void TCPConnector::abort() { > // Can't abort a closed connection > if (!closed) { >@@ -159,8 +164,7 @@ void TCPConnector::abort() { > aio->requestCallback(boost::bind(&TCPConnector::eof, this, _1)); > } else if (connector) { > // We're still connecting >- connector->stop(); >- connectFailed("Connection timedout"); >+ connector->requestCallback(boost::bind(&TCPConnector::connectAborted, this)); > } > } > } >diff --git a/qpid/cpp/src/qpid/client/TCPConnector.h b/qpid/cpp/src/qpid/client/TCPConnector.h >index a90dffd..63af3b8 100644 >--- a/qpid/cpp/src/qpid/client/TCPConnector.h >+++ b/qpid/cpp/src/qpid/client/TCPConnector.h >@@ -80,6 +80,7 @@ class TCPConnector : public Connector, public sys::Codec > void close(); > void send(framing::AMQFrame& frame); > void abort(); >+ void connectAborted(); > > void setInputHandler(framing::InputHandler* handler); > void setShutdownHandler(sys::ShutdownHandler* handler); >diff --git a/qpid/cpp/src/qpid/sys/AsynchIO.h b/qpid/cpp/src/qpid/sys/AsynchIO.h >index 8eed72d..a531ee1 100644 >--- a/qpid/cpp/src/qpid/sys/AsynchIO.h >+++ b/qpid/cpp/src/qpid/sys/AsynchIO.h >@@ -58,6 +58,7 @@ class AsynchConnector { > public: > typedef boost::function1<void, const Socket&> ConnectedCallback; > typedef boost::function3<void, const Socket&, int, const std::string&> FailedCallback; >+ typedef boost::function1<void, AsynchConnector&> RequestCallback; > > // Call create() to allocate a new AsynchConnector object with the > // specified poller, addressing, and callbacks. >@@ -72,6 +73,7 @@ public: > FailedCallback failCb); > virtual void start(boost::shared_ptr<Poller> poller) = 0; > virtual void stop() {}; >+ virtual void requestCallback(RequestCallback) = 0; > protected: > AsynchConnector() {} > virtual ~AsynchConnector() {} >diff --git a/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp b/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp >index 7eb25fd..2c17cc0 100644 >--- a/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp >+++ b/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp >@@ -143,6 +143,7 @@ class AsynchConnector : public qpid::sys::AsynchConnector, > > private: > void connComplete(DispatchHandle& handle); >+ void requestedCall(RequestCallback rCb); > > private: > ConnectedCallback connCallback; >@@ -158,6 +159,7 @@ public: > FailedCallback failCb); > void start(Poller::shared_ptr poller); > void stop(); >+ void requestCallback(RequestCallback rCb); > }; > > AsynchConnector::AsynchConnector(const Socket& s, >@@ -191,6 +193,18 @@ void AsynchConnector::stop() > stopWatch(); > } > >+void AsynchConnector::requestCallback(RequestCallback callback) { >+ // TODO creating a function object every time isn't all that >+ // efficient - if this becomes heavily used do something better (what?) >+ assert(callback); >+ DispatchHandle::call(boost::bind(&AsynchConnector::requestedCall, this, callback)); >+} >+ >+void AsynchConnector::requestedCall(RequestCallback callback) { >+ assert(callback); >+ callback(*this); >+} >+ > void AsynchConnector::connComplete(DispatchHandle& h) > { > int errCode = socket.getError();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 874192
:
640226
|
646451
|
646510
| 648218