X-Git-Url: https://git.piment-noir.org/?p=deb_shairplay.git;a=blobdiff_plain;f=src%2Flib%2Fhttpd.c;h=dfd3d6b6a2a167587ef02e1d77e8cd23b16d695b;hp=88971faa5f57451b22d58a1959da108bd9229e68;hb=1321b5e9b11116f961b222a2e142701ff353e9cc;hpb=cf9b3c345f41b25cf3d2ec968f6690d90d783e10 diff --git a/src/lib/httpd.c b/src/lib/httpd.c index 88971fa..dfd3d6b 100644 --- a/src/lib/httpd.c +++ b/src/lib/httpd.c @@ -326,6 +326,16 @@ httpd_thread(void *arg) httpd_remove_connection(httpd, connection); } + /* Close server sockets since they are not used any more */ + if (httpd->server_fd4 != -1) { + closesocket(httpd->server_fd4); + httpd->server_fd4 = -1; + } + if (httpd->server_fd6 != -1) { + closesocket(httpd->server_fd6); + httpd->server_fd6 = -1; + } + logger_log(httpd->logger, LOGGER_INFO, "Exiting HTTP thread"); return 0;