Merge pull request #12045 from tupfold/master
[Minor Bugfix] Extremely rare HostID collision bugfix
This commit is contained in:
commit
0a2afa48b7
|
@ -312,9 +312,9 @@ static void HandlePacket(Common::TraversalPacket* packet, sockaddr_in6* addr)
|
||||||
Common::TraversalInetAddress* iaddr{};
|
Common::TraversalInetAddress* iaddr{};
|
||||||
// not that there is any significant change of
|
// not that there is any significant change of
|
||||||
// duplication, but...
|
// duplication, but...
|
||||||
GetRandomHostId(&hostId);
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
GetRandomHostId(&hostId);
|
||||||
auto r = EvictFind(connectedClients, hostId);
|
auto r = EvictFind(connectedClients, hostId);
|
||||||
if (!r.found)
|
if (!r.found)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue