diff options
Diffstat (limited to 'cpp/src/qpid/sys')
| -rw-r--r-- | cpp/src/qpid/sys/AsynchIO.h | 3 | ||||
| -rw-r--r-- | cpp/src/qpid/sys/AsynchIOAcceptor.cpp | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/cpp/src/qpid/sys/AsynchIO.h b/cpp/src/qpid/sys/AsynchIO.h index ea2badf456..7cb56b30aa 100644 --- a/cpp/src/qpid/sys/AsynchIO.h +++ b/cpp/src/qpid/sys/AsynchIO.h @@ -106,9 +106,10 @@ public: void start(Poller::shared_ptr poller); void queueReadBuffer(BufferBase* buff); - void queueWrite(BufferBase* buff = 0); void unread(BufferBase* buff); + void queueWrite(BufferBase* buff = 0); void queueWriteClose(); + bool writeQueueEmpty() { return writeQueue.empty(); } BufferBase* getQueuedBuffer(); const Socket& getSocket() const { return DispatchHandle::getSocket(); } diff --git a/cpp/src/qpid/sys/AsynchIOAcceptor.cpp b/cpp/src/qpid/sys/AsynchIOAcceptor.cpp index 78b156877a..6f5c85cfc2 100644 --- a/cpp/src/qpid/sys/AsynchIOAcceptor.cpp +++ b/cpp/src/qpid/sys/AsynchIOAcceptor.cpp @@ -246,6 +246,10 @@ void AsynchIOHandler::eof(AsynchIO&) { } void AsynchIOHandler::closedSocket(AsynchIO&, const Socket& s) { + // If we closed with data still to send log a warning + if (!aio->writeQueueEmpty()) { + QPID_LOG(warning, "CLOSING [" << aio->getSocket().getPeerAddress() << "] unsent data (probably due to client disconnect)"); + } delete &s; aio->queueForDeletion(); delete this; |
