Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/neutrinolabs/ulalaca-xrdp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGyuhwan Park <unstabler@unstabler.pl>2022-10-07 08:53:37 +0300
committerGyuhwan Park <unstabler@unstabler.pl>2022-10-07 08:53:37 +0300
commit569d286962a19146f2f0a8e2babfc2b98679d800 (patch)
tree86cce08b27c6481ebbd5131a2e3b5885f03770ac
parent3d841ddb09539bb5fb252f6b26c1a738a1129183 (diff)
fix(IPCConnection): flush read tasks and close connection when POLLHUP bit set
-rw-r--r--IPCConnection.cpp5
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) {