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;