From 53c2fbb4c47d4efafd6380c60e575cda3b4a93fa Mon Sep 17 00:00:00 2001 From: red-001 Date: Sat, 31 Aug 2024 16:42:37 +0100 Subject: [PATCH] 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. --- src/server.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/server.cpp b/src/server.cpp index 6e42b22a0..508d5b86b 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -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();