From fd5dbfc7d369b0439aaf922141692472ccc1d6dd Mon Sep 17 00:00:00 2001 From: Kouya Heika Date: Mon, 20 Apr 2026 20:48:11 -0500 Subject: [PATCH] Handle clients own disconnect and don't queue an UP and break if we haven't checked initial connection yet. --- src/services.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/services.c b/src/services.c index a1b6e5a..ffb20cd 100644 --- a/src/services.c +++ b/src/services.c @@ -111,8 +111,6 @@ void* run_endpoint(void* endpoint) { self->sockfd = fd; self->last_errno = 0; - queue_report((struct EndpointStatus){ self, UP, ping }); - break; } } @@ -144,7 +142,7 @@ void* run_endpoint(void* endpoint) { } } - if (pfd.revents & (POLLERR | POLLHUP | POLLRDHUP)) { + if ((pfd.revents & (POLLERR | POLLHUP | POLLRDHUP)) || pfd.events & POLLRDHUP) { close(self->sockfd); self->sockfd = -1; continue;