From 7eb118920f97f58cadc42a5af48ff6dc518b5cd3 Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 17 Nov 2025 15:57:06 +0100 Subject: [PATCH] SOCK_Get: recvfrom returning 0 still means its not a valid packet 0 lenght packets means, nothing 0 is still failure, just graceful, ignore that shit, those are not "valid" packets --- src/i_tcp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/i_tcp.c b/src/i_tcp.c index 5b6a0bf08..98a03f841 100644 --- a/src/i_tcp.c +++ b/src/i_tcp.c @@ -635,7 +635,7 @@ static boolean SOCK_Get(void) c = recvfrom(mysockets[n], (char *)&doomcom->data, MAXPACKETLENGTH, 0, (void *)&fromaddress, &fromlen); - if (c != ERRSOCKET) + if (c > 0) { #ifdef USE_STUN if (STUN_got_response(doomcom->data, c)) @@ -649,7 +649,6 @@ static boolean SOCK_Get(void) break; } #endif - // find remote node number for (j = 1; j <= MAXNETNODES; j++) // include LAN {