mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-25 14:06:41 +01:00
Fix a weird overflow error I've seen
This commit is contained in:
@@ -162,7 +162,8 @@ namespace Tgstation.Server.Tests.Live.Instance
|
||||
|
||||
await JobsClient.Cancel(job, cancellationToken);
|
||||
|
||||
timeout -= (int)Math.Ceiling((DateTimeOffset.UtcNow - start).TotalSeconds);
|
||||
timeout -= Math.Max(0, (int)Math.Ceiling((DateTimeOffset.UtcNow - start).TotalSeconds));
|
||||
timeout = Math.Max(0, timeout);
|
||||
return await WaitForJob(job, timeout, false, null, cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user