diff --git a/BeefySysLib/util/BeefPerf.cpp b/BeefySysLib/util/BeefPerf.cpp index 49ffeef1..e1dae1c1 100644 --- a/BeefySysLib/util/BeefPerf.cpp +++ b/BeefySysLib/util/BeefPerf.cpp @@ -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;