Skip to content
Snippets Groups Projects
Commit b0c19bd3 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fix bad listening socket detection in multisock

A socket isn't bad just because there was no incoming connections. :D
parent b033970c
No related branches found
No related tags found
No related merge requests found
......@@ -387,7 +387,7 @@ SOCKET DLLCALL xpms_accept(struct xpms_set *xpms_set, union xp_sockaddr * addr,
for(i=0; i<xpms_set->sock_count; i++) {
if(xpms_set->socks[i].sock == INVALID_SOCKET)
continue;
if ((fds[scnt].revents & POLLIN) == 0) {
if (fds[scnt].revents & (POLLERR | POLLNVAL)) {
closesocket(xpms_set->socks[i].sock);
xpms_set->lprintf(LOG_ERR, "%04d * Listening socket went bad", xpms_set->socks[i].sock);
xpms_set->socks[i].sock = INVALID_SOCKET;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment