protocol: Tolerate EINTR from epoll_wait

Avoid reconnecting on gdb breakpoints
This commit is contained in:
Luke Dashjr 2025-04-15 11:05:06 +00:00
parent 0d1fa6006f
commit f9b38d9223
No known key found for this signature in database
GPG Key ID: A291A2C45D0C504A

View File

@ -1676,12 +1676,12 @@ void *datum_protocol_client(void *args) {
nfds = epoll_wait(epollfd, events, MAX_DATUM_CLIENT_EVENTS, 5); // Wait for 5ms
if (nfds == -1) {
if (nfds == -1 && errno != EINTR) {
DLOG_FATAL("epoll_wait(...) error: %s",strerror(errno));
break;
}
if (nfds == 0) {
if (nfds <= 0) {
continue; // Timeout, nothing happened
}