Handle clients own disconnect and don't queue an UP and break if we haven't checked initial connection yet.

This commit is contained in:
Kouya Heika
2026-04-20 20:48:11 -05:00
parent 191e569913
commit fd5dbfc7d3

View File

@@ -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;