1
0
Fork 1

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
1 changed files with 1 additions and 1 deletions

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;
}