mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
eliminate potential excessive CPU usage
This commit is contained in:
parent
9208da8a50
commit
7bff4db483
@ -385,7 +385,14 @@ namespace data
|
||||
else
|
||||
{
|
||||
delete verifier;
|
||||
while (!m_Verifier) ; // spin lock
|
||||
int count = 0;
|
||||
while (!m_Verifier && count < 500) // 5 seconds
|
||||
{
|
||||
std::this_thread::sleep_for (std::chrono::milliseconds(10));
|
||||
count++;
|
||||
}
|
||||
if (!m_Verifier)
|
||||
LogPrint (eLogError, "Identity: couldn't get verifier in 5 seconds");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user