1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 04:23:51 +00:00

Handle client disappearance broadcasts.

This commit is contained in:
Bartosz Taudul 2020-09-20 22:40:38 +02:00
parent 0a5de933c4
commit 1a91acc661

View File

@ -524,6 +524,8 @@ static void DrawContents()
const auto ipNumerical = addr.GetNumber();
const auto clientId = uint64_t( ipNumerical ) | ( uint64_t( listenPort ) << 32 );
auto it = clients.find( clientId );
if( activeTime >= 0 )
{
if( it == clients.end() )
{
std::string ip( address );
@ -550,6 +552,11 @@ static void DrawContents()
if( strcmp( it->second.procName.c_str(), procname ) != 0 ) it->second.procName = procname;
}
}
else if( it != clients.end() )
{
clients.erase( it );
}
}
}
auto it = clients.begin();
while( it != clients.end() )