From 2e8f75172d3928df7f113a7176f4fc275f6ed379 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Wed, 3 Jul 2019 12:41:19 +0200 Subject: Update Socket.cpp --- contrib/Socket.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'contrib') 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)); -- cgit v1.2.3