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:
		| @@ -540,7 +540,8 @@ int client_manager_io(void) | |||||||
| 			} | 			} | ||||||
| 			client->lastTime = time(NULL); | 			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_write_deferred(client); | ||||||
| 			client->lastTime = time(NULL); | 			client->lastTime = time(NULL); | ||||||
| 		} | 		} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann