Don't attempt to process packets when there are none

Under certain unlikely circumstances the main server loop could attempt to process packets even when the connection didn't return one. This would result in the default empty packet being processed resulting in spurious warnings about a missing client.
This commit is contained in:
red-001 2024-08-31 16:42:37 +01:00 committed by SmallJoker
parent 1d042a977d
commit 53c2fbb4c4

@ -1071,6 +1071,8 @@ void Server::Receive(float timeout)
// and a faster server-step is better than busy waiting.
if (remaining_time_us() < 1000.0f)
break;
else
continue;
}
peer_id = pkt.getPeerId();