summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorUpfoldian <thomasupfold@gmail.com>2023-07-13 21:33:36 +1000
committerUpfoldian <thomasupfold@gmail.com>2023-07-13 21:33:36 +1000
commitc4978edaf6dbef81903f84ce0b3ef45b270fa926 (patch)
treeb8a50348b9cd31808258443882f2487636314027 /Source/Core
parent7f40c6f2f86cb3f77b155240df0e512dfe1eef29 (diff)
Fixed a bug where in the extremely unlikely change that HostIDs collide, a new HostID is generated.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Common/TraversalServer.cpp2
1 files changed, 1 insertions, 1 deletions
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)
{