mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +00:00
Limit client query response rate.
Original idea by xavier <xavierb@gmail.com>
This commit is contained in:
parent
621d1b03cd
commit
1e6aedf9e6
@ -1687,10 +1687,12 @@ void Profiler::Worker()
|
||||
keepAlive = 0;
|
||||
}
|
||||
|
||||
int quota = 500;
|
||||
bool connActive = true;
|
||||
while( m_sock->HasData() && connActive )
|
||||
while( quota-- && m_sock->HasData() )
|
||||
{
|
||||
connActive = HandleServerQuery();
|
||||
if( !connActive ) break;
|
||||
}
|
||||
if( !connActive ) break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user