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 | 55f8cbf5b379b203a3b26a0f4b6b12919319f1e4 (patch) | |
tree | 69c2703bebd2ed487891fb7034baefb80f1e17fa /cpp | |
parent | 46b6c62ef8dc04de84601e82c1e86d6d511f9cdc (diff) | |
download | qpid-python-55f8cbf5b379b203a3b26a0f4b6b12919319f1e4.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/qpid@787810 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/qpid/sys/AsynchIOHandler.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cpp/src/qpid/sys/AsynchIOHandler.cpp b/cpp/src/qpid/sys/AsynchIOHandler.cpp index 03543dc239..3b85a63d19 100644 --- a/cpp/src/qpid/sys/AsynchIOHandler.cpp +++ b/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(); } } |