Skip to content
Snippets Groups Projects
Commit fe2b4bd0 authored by deuce's avatar deuce
Browse files

Fix up handling of disconnected sockets.

parent a71460cc
Branches
Tags
No related merge requests found
......@@ -112,6 +112,7 @@ static void sendsmsg(struct sbbs_status_msg *msg)
if (ERROR_VALUE != EAGAIN) {
closesocket(*sock);
if (!os_init) {
os_init = true;
listInit(&off_socks, 0);
}
listPushNode(&off_socks, sock);
......@@ -126,6 +127,7 @@ static void sendsmsg(struct sbbs_status_msg *msg)
next = node->next;
sock = node->data;
client_off(*sock);
free(sock);
protected_uint32_adjust(&active_clients, -1);
update_clients();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment