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
This commit is contained in:
1 parent
2f0588355e
commit
7eb118920f
1 file changed
+1
-2
+1
-2
@@ -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
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user