mirror of
https://github.com/minetest/minetest.git
synced 2025-03-06 20:48:40 +01:00
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:
parent
1b8b84bee8
commit
48e65ac846
1 changed files with 2 additions and 0 deletions
|
@ -1076,6 +1076,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();
|
||||
|
|
Loading…
Add table
Reference in a new issue