From 59438a478a4b5035b900590529b4df7d6f4451ba Mon Sep 17 00:00:00 2001 From: RainOrigami Date: Tue, 5 Sep 2023 17:47:49 +0200 Subject: [PATCH] Fixes invoke timeout stopwatch not resetting --- BBRAPIModules/RunnerServer.cs | 6 +++--- BattleBitAPIRunner/BattleBitAPIRunner.csproj | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/BBRAPIModules/RunnerServer.cs b/BBRAPIModules/RunnerServer.cs index d253f96..2ebdc5f 100644 --- a/BBRAPIModules/RunnerServer.cs +++ b/BBRAPIModules/RunnerServer.cs @@ -48,7 +48,7 @@ private async Task invokeOnModulesWithBoolReturnValue(string method, param { try { - stopwatch.Start(); + stopwatch.Restart(); bool moduleResult = await (Task)typeof(BattleBitModule).GetMethod(method).Invoke(module, parameters); if (!moduleResult) @@ -81,7 +81,7 @@ private async Task invokeOnModulesWithBoolReturnValue(string method, param { try { - stopwatch.Start(); + stopwatch.Restart(); OnPlayerSpawnArguments? moduleResult = await (Task)typeof(BattleBitModule).GetMethod(method).Invoke(module, new object?[] { player, previousValidSpawnArguments }); if (moduleResult is not null) @@ -121,7 +121,7 @@ private async Task invokeOnModules(string method, params object?[] parameters) { try { - stopwatch.Start(); + stopwatch.Restart(); await (Task)typeof(BattleBitModule).GetMethod(method).Invoke(module, parameters); } catch (Exception ex) diff --git a/BattleBitAPIRunner/BattleBitAPIRunner.csproj b/BattleBitAPIRunner/BattleBitAPIRunner.csproj index 3079fb0..d4b2d6f 100644 --- a/BattleBitAPIRunner/BattleBitAPIRunner.csproj +++ b/BattleBitAPIRunner/BattleBitAPIRunner.csproj @@ -5,7 +5,7 @@ net6.0 enable enable - 0.4.12.4 + 0.4.12.5 $(AssemblyVersion)