]> PatchyGit - patchyircd.git/commitdiff
close listen sockets on exit
authorEgor <egor@patchysicp.xyz>
Thu, 26 May 2022 21:59:27 +0000 (00:59 +0300)
committerEgor <egor@patchysicp.xyz>
Thu, 26 May 2022 21:59:27 +0000 (00:59 +0300)
main.c

diff --git a/main.c b/main.c
index 259f6bd..8318d7a 100644 (file)
--- a/main.c
+++ b/main.c
@@ -365,6 +365,8 @@ int main(int argc, char *argv[])
                if (clients[i])
                        killConnection(clients[i], false);
        net_cleanup();
+       for (int i = 0; i < listener_count; i++)
+               closesocket(listeners[i].sock);
 #ifdef HAS_TLS
        tls_free(tls_ctx);
 #endif