From acd2dc3183320d46dc15e5766200f2de437d3348 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Mon, 5 Mar 2018 15:09:26 +0100 Subject: [PATCH] Shutdown sockets before closing The server socket does not release the port it was listening for if we just close it: we must also shutdown it. --- app/src/server.c | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/server.c b/app/src/server.c index 28daabaa..d5d8b673 100644 --- a/app/src/server.c +++ b/app/src/server.c @@ -71,6 +71,7 @@ static socket_t listen_on_port(Uint16 port) { static void close_socket(socket_t *socket) { SDL_assert(*socket != INVALID_SOCKET); + net_shutdown(*socket, SHUT_RDWR); if (!net_close(*socket)) { LOGW("Cannot close socket"); return;