From a39150e63ad80016ea533337c9d6cf4d7516245d Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Wed, 3 Jul 2019 15:48:53 +0200 Subject: Update Socket.cpp --- lib/Socket.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/Socket.cpp') diff --git a/lib/Socket.cpp b/lib/Socket.cpp index d14902e..cd70a8e 100644 --- a/lib/Socket.cpp +++ b/lib/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)); -- cgit v1.2.3