diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2009-06-23 20:02:18 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2009-06-23 20:02:18 +0000 |
| commit | 58708b8f55892a5aef43a2618a113d6ac1ece469 (patch) | |
| tree | d32db68bb87b28dd2fb5573dad68339f85512d1e /qpid/cpp/src | |
| parent | 582c5382fc75fd4decf16a07f70c3df3556b1b1f (diff) | |
| download | qpid-python-58708b8f55892a5aef43a2618a113d6ac1ece469.tar.gz | |
Don't schedule eof() in response to traffic timeout if already
disconnecting and make sure that this is true for all close
down paths
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@787810 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/sys/AsynchIOHandler.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/sys/AsynchIOHandler.cpp b/qpid/cpp/src/qpid/sys/AsynchIOHandler.cpp index 03543dc239..3b85a63d19 100644 --- a/qpid/cpp/src/qpid/sys/AsynchIOHandler.cpp +++ b/qpid/cpp/src/qpid/sys/AsynchIOHandler.cpp @@ -78,7 +78,10 @@ void AsynchIOHandler::write(const framing::ProtocolInitiation& data) } void AsynchIOHandler::abort() { - aio->requestCallback(boost::bind(&AsynchIOHandler::eof, this, _1)); + // Don't disconnect if we're already disconnecting + if (!readError) { + aio->requestCallback(boost::bind(&AsynchIOHandler::eof, this, _1)); + } } void AsynchIOHandler::activateOutput() { @@ -204,10 +207,13 @@ void AsynchIOHandler::idle(AsynchIO&){ buff->dataCount = encoded; aio->queueWrite(buff); } - if (codec->isClosed()) + if (codec->isClosed()) { + readError = true; aio->queueWriteClose(); + } } catch (const std::exception& e) { QPID_LOG(error, e.what()); + readError = true; aio->queueWriteClose(); } } |
