Commit f0d3d7e8 authored by Sergey Lyubka's avatar Sergey Lyubka

Cleaning up ctl sockets

parent d1bd1529
...@@ -971,6 +971,8 @@ void mg_destroy_server(struct mg_server **server) { ...@@ -971,6 +971,8 @@ void mg_destroy_server(struct mg_server **server) {
if (server != NULL && *server != NULL) { if (server != NULL && *server != NULL) {
closesocket((*server)->listening_sock); closesocket((*server)->listening_sock);
closesocket((*server)->ctl[0]);
closesocket((*server)->ctl[1]);
LINKED_LIST_FOREACH(&(*server)->active_connections, lp, tmp) { LINKED_LIST_FOREACH(&(*server)->active_connections, lp, tmp) {
conn = LINKED_LIST_ENTRY(lp, struct mg_connection, link); conn = LINKED_LIST_ENTRY(lp, struct mg_connection, link);
LINKED_LIST_REMOVE(&conn->link); LINKED_LIST_REMOVE(&conn->link);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment