Skip to content

Commit

Permalink
Fixes invoke timeout stopwatch not resetting
Browse files Browse the repository at this point in the history
  • Loading branch information
RainOrigami committed Sep 5, 2023
1 parent 014aab6 commit 59438a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions BBRAPIModules/RunnerServer.cs
Expand Up @@ -48,7 +48,7 @@ private async Task<bool> invokeOnModulesWithBoolReturnValue(string method, param
{
try
{
stopwatch.Start();
stopwatch.Restart();
bool moduleResult = await (Task<bool>)typeof(BattleBitModule).GetMethod(method).Invoke(module, parameters);

if (!moduleResult)
Expand Down Expand Up @@ -81,7 +81,7 @@ private async Task<bool> invokeOnModulesWithBoolReturnValue(string method, param
{
try
{
stopwatch.Start();
stopwatch.Restart();
OnPlayerSpawnArguments? moduleResult = await (Task<OnPlayerSpawnArguments?>)typeof(BattleBitModule).GetMethod(method).Invoke(module, new object?[] { player, previousValidSpawnArguments });

if (moduleResult is not null)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion BattleBitAPIRunner/BattleBitAPIRunner.csproj
Expand Up @@ -5,7 +5,7 @@
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AssemblyVersion>0.4.12.4</AssemblyVersion>
<AssemblyVersion>0.4.12.5</AssemblyVersion>
<FileVersion>$(AssemblyVersion)</FileVersion>
</PropertyGroup>

Expand Down

0 comments on commit 59438a4

Please sign in to comment.