1
0
mirror of https://git.sr.ht/~sircmpwn/gmnisrv synced 2024-11-03 06:07:17 -05:00

Fix not moving all fds

This commit is contained in:
Tom Lebreux 2020-11-07 00:12:00 -05:00 committed by Drew DeVault
parent 4f12abfbc2
commit d20caf389b

View File

@ -200,7 +200,7 @@ disconnect_client(struct gmnisrv_server *server, struct gmnisrv_client *client)
memmove(client, &client[1], &server->clients[server->clientsz] - client);
memmove(&server->fds[server->nlisten + index],
&server->fds[server->nlisten + index + 1],
server->fdsz - (server->nlisten + index + 1) * sizeof(struct pollfd));
(server->fdsz - (server->nlisten + index + 1)) * sizeof(struct pollfd));
--server->nfds;
--server->nclients;
}