Commit 6146d4f5 authored by Max Kellermann's avatar Max Kellermann

client: don't check FD_ISSET(client->fd) on expired client

client->fd becomes -1 when the client expires. Don't use FD_ISSET() with this expired client; doing so would cause a crash due to SIGBUS.
parent 77b16716
......@@ -540,7 +540,8 @@ int client_manager_io(void)
}
client->lastTime = time(NULL);
}
if (FD_ISSET(client->fd, &wfds)) {
if (!client_is_expired(client) &&
FD_ISSET(client->fd, &wfds)) {
client_write_deferred(client);
client->lastTime = time(NULL);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment