From 2c0e478e371d14df47d7a7f31515bbd1091f5b6a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 6 Sep 2008 15:31:55 +0200 Subject: 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. --- src/client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/client.c b/src/client.c index 6bda52bd5..d04cac31f 100644 --- a/src/client.c +++ b/src/client.c @@ -536,7 +536,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); } -- cgit v1.2.3