mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-15 01:28:34 -05:00
fix issues with game interface reconnecting after rcon connection lost
This commit is contained in:
@ -111,7 +111,7 @@ public class ScriptPluginTimerHelper : IScriptPluginTimerHelper
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_logger.LogDebug("-Releasing OnTick for timer");
|
||||
_onDependentAction?.Release(1);
|
||||
}
|
||||
private void OnTick()
|
||||
@ -128,7 +128,8 @@ public class ScriptPluginTimerHelper : IScriptPluginTimerHelper
|
||||
_onRunningTick.Reset();
|
||||
|
||||
// the js engine is not thread safe so we need to ensure we're not executing OnTick and OnEventAsync simultaneously
|
||||
_onDependentAction?.WaitAsync().Wait();
|
||||
_onDependentAction?.Wait();
|
||||
_logger.LogDebug("+Running OnTick for timer");
|
||||
var start = DateTime.Now;
|
||||
_jsAction.DynamicInvoke(JsValue.Undefined, new[] { JsValue.Undefined });
|
||||
_logger.LogDebug("OnTick took {Time}ms", (DateTime.Now - start).TotalMilliseconds);
|
||||
|
Reference in New Issue
Block a user