diff options
-rw-r--r-- | IPCConnection.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/IPCConnection.cpp b/IPCConnection.cpp index d74cd44..317a27d 100644 --- a/IPCConnection.cpp +++ b/IPCConnection.cpp @@ -150,6 +150,11 @@ void IPCConnection::workerLoop() { if (pollFd.revents & POLLHUP) { LOG(LOG_LEVEL_WARNING, "POLLHUP bit set"); + + if (_readTasks.empty()) { + LOG(LOG_LEVEL_WARNING, "POLLHUP bit set; closing connection"); + break; + } } if (pollFd.revents & POLLERR) { |