From c4978edaf6dbef81903f84ce0b3ef45b270fa926 Mon Sep 17 00:00:00 2001 From: Upfoldian Date: Thu, 13 Jul 2023 21:33:36 +1000 Subject: [PATCH] Fixed a bug where in the extremely unlikely change that HostIDs collide, a new HostID is generated. --- Source/Core/Common/TraversalServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Common/TraversalServer.cpp b/Source/Core/Common/TraversalServer.cpp index b9b05519fa..a3d28d1bab 100644 --- a/Source/Core/Common/TraversalServer.cpp +++ b/Source/Core/Common/TraversalServer.cpp @@ -312,9 +312,9 @@ static void HandlePacket(Common::TraversalPacket* packet, sockaddr_in6* addr) Common::TraversalInetAddress* iaddr{}; // not that there is any significant change of // duplication, but... - GetRandomHostId(&hostId); while (true) { + GetRandomHostId(&hostId); auto r = EvictFind(connectedClients, hostId); if (!r.found) {