mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-24 21:46:52 +01:00
User connection updates should bypass the jobs hub message rate limiter
This commit is contained in:
@@ -341,7 +341,7 @@ namespace Tgstation.Server.Host.Jobs
|
||||
Stopwatch stopwatch = null;
|
||||
void QueueHubUpdate(JobResponse update, bool final)
|
||||
{
|
||||
void NextUpdate()
|
||||
void NextUpdate(bool bypassRate)
|
||||
{
|
||||
var currentUpdatesTask = hubUpdatesTask;
|
||||
async Task ChainHubUpdate()
|
||||
@@ -358,7 +358,7 @@ namespace Tgstation.Server.Host.Jobs
|
||||
Stopwatch enteredLock = null;
|
||||
try
|
||||
{
|
||||
if (stopwatch != null)
|
||||
if (!bypassRate && stopwatch != null)
|
||||
{
|
||||
Monitor.Enter(stopwatch);
|
||||
enteredLock = stopwatch;
|
||||
@@ -381,9 +381,9 @@ namespace Tgstation.Server.Host.Jobs
|
||||
if (final)
|
||||
hubUpdateActions.Remove(jobId);
|
||||
else
|
||||
hubUpdateActions[jobId] = NextUpdate;
|
||||
hubUpdateActions[jobId] = () => NextUpdate(true);
|
||||
|
||||
NextUpdate();
|
||||
NextUpdate(false);
|
||||
}
|
||||
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user