From 6146d4f5bbb800a1499ab23ea8cc997e97d6cb06 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/client.c') diff --git a/src/client.c b/src/client.c index 2acc1556..28fb5270 100644 --- a/src/client.c +++ b/src/client.c @@ -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); } -- cgit v1.2.3