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:
parent
935d5bd340
commit
6816c1e006
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue