aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Socket.cpp4
1 files changed, 4 insertions, 0 deletions
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));