diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-07-03 15:48:53 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-07-03 15:48:53 +0200 |
commit | a39150e63ad80016ea533337c9d6cf4d7516245d (patch) | |
tree | aa849e078a56abe0b19cfce15df431f6f9f47601 /lib/Socket.cpp | |
parent | f7b5d4e42f30ba22ef1c830633f0b962a8d8ea0a (diff) | |
download | ODR-SourceCompanion-a39150e63ad80016ea533337c9d6cf4d7516245d.tar.gz ODR-SourceCompanion-a39150e63ad80016ea533337c9d6cf4d7516245d.tar.bz2 ODR-SourceCompanion-a39150e63ad80016ea533337c9d6cf4d7516245d.zip |
Update Socket.cpp
Diffstat (limited to 'lib/Socket.cpp')
-rw-r--r-- | lib/Socket.cpp | 4 |
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)); |