Cleaning up ctl sockets

This commit is contained in:
Sergey Lyubka committed 2013-11-30 23:59:53 +00:00
1 parent d1bd15291e
commit f0d3d7e81d
1 file changed
+2
+2
View File
@@ -971,6 +971,8 @@ void mg_destroy_server(struct mg_server **server) {
if (server != NULL && *server != NULL) {
closesocket((*server)->listening_sock);
closesocket((*server)->ctl[0]);
closesocket((*server)->ctl[1]);
LINKED_LIST_FOREACH(&(*server)->active_connections, lp, tmp) {
conn = LINKED_LIST_ENTRY(lp, struct mg_connection, link);
LINKED_LIST_REMOVE(&conn->link);