From d20caf389bd6cd8e6d8daaeb6d51a022fc643292 Mon Sep 17 00:00:00 2001 From: Tom Lebreux Date: Sat, 7 Nov 2020 00:12:00 -0500 Subject: [PATCH] Fix not moving all fds --- src/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index 3a07b9b..9ce304f 100644 --- a/src/server.c +++ b/src/server.c @@ -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; }