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.
This commit is contained in:
parent
77b1671662
commit
6146d4f5bb
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user