diff options
-rw-r--r-- | contrib/Socket.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/Socket.cpp b/contrib/Socket.cpp index d14902e..cd70a8e 100644 --- a/contrib/Socket.cpp +++ b/contrib/Socket.cpp @@ -872,6 +872,10 @@ void TCPReceiveServer::process() if (r < 0) { throw logic_error("Invalid recv return value"); } + else if (r == 0) { + sock.close(); + break; + } else { buf.resize(r); m_queue.push(move(buf)); |