From 1b489dec1ea09cde9365602befb49eb958a62cdd Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Fri, 22 Jan 2010 21:24:52 +0000 Subject: If we've already closed Connection don't attempt to write to it git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@902278 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/TCPConnector.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cpp/src') diff --git a/cpp/src/qpid/client/TCPConnector.cpp b/cpp/src/qpid/client/TCPConnector.cpp index 360d8c133c..00584d168e 100644 --- a/cpp/src/qpid/client/TCPConnector.cpp +++ b/cpp/src/qpid/client/TCPConnector.cpp @@ -200,6 +200,10 @@ void TCPConnector::handleClosed() { void TCPConnector::writebuff(AsynchIO& /*aio*/) { + // It's possible to be disconnected and be writable + if (closed) + return; + Codec* codec = securityLayer.get() ? (Codec*) securityLayer.get() : (Codec*) this; if (codec->canEncode()) { std::auto_ptr buffer = std::auto_ptr(aio->getQueuedBuffer()); -- cgit v1.2.1