Fixed a bug where in the extremely unlikely change that HostIDs collide, a new HostID is generated.
This commit is contained in:
parent
7f40c6f2f8
commit
c4978edaf6
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue