From b5086b848b32e350d68e16d90795e5d627100e36 Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 12 Nov 2020 17:07:34 -0800 Subject: [PATCH] Ignore zero length packets --- src/i_tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i_tcp.c b/src/i_tcp.c index d0bbf74d..9b250b75 100644 --- a/src/i_tcp.c +++ b/src/i_tcp.c @@ -633,7 +633,7 @@ static boolean SOCK_Get(void) fromlen = (socklen_t)sizeof(fromaddress); 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))