1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-21 17:28:00 +02:00

Better limit on BeefPerf connection waiting

This commit is contained in:
Brian Fiete 2022-07-11 07:32:52 -04:00
parent 935d5bd340
commit 6816c1e006

View file

@ -757,10 +757,15 @@ bool BpManager::Connect()
if (mShutdownEvent.WaitFor(0))
{
// We are shutting down - have we waited enough?
int minWaitMS = isLocalhost ? 50 : 20*1000;
int minWaitMS = isLocalhost ? 50 : 5*1000;
if (totalWaitedMS >= minWaitMS)
return false;
}
// We don't want to wait too long, otherwise we will buffer up too much
int maxWaitMS = isLocalhost ? 5*1000 : 15*1000;
if (totalWaitedMS >= maxWaitMS)
return false;
}
return true;