ipc: Handle POLLIN/OUT even when ERR

This commit is contained in:
Nicolas Williams
2022-01-24 18:26:55 -06:00
parent 5bb5033f10
commit f3517c0d01

View File

@@ -1014,15 +1014,12 @@ process_loop(void)
for (n = 0 ; n < num_fds; n++) { for (n = 0 ; n < num_fds; n++) {
if (clients[n] == NULL) if (clients[n] == NULL)
continue; continue;
if (fds[n].revents & POLLERR) {
clients[n]->flags |= WAITING_CLOSE;
continue;
}
if (fds[n].revents & POLLIN) if (fds[n].revents & POLLIN)
handle_read(clients[n]); handle_read(clients[n]);
if (fds[n].revents & POLLOUT) if (fds[n].revents & POLLOUT)
handle_write(clients[n]); handle_write(clients[n]);
if (fds[n].revents & POLLERR)
clients[n]->flags |= WAITING_CLOSE;
} }
n = 0; n = 0;