Merge pull request #12045 from tupfold/master

[Minor Bugfix]  Extremely rare HostID collision bugfix
This commit is contained in:
Admiral H. Curtiss 2023-07-24 03:55:45 +02:00 committed by GitHub
commit 0a2afa48b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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)
{