1
0
mirror of https://github.com/bitwarden/server.git synced 2025-02-22 02:51:33 +01:00

HeartbeatHostedService use cancel token (#2654)

This commit is contained in:
Kyle Spearrin 2023-01-31 11:20:21 -05:00 committed by GitHub
parent 8ba806667c
commit 54353f8b6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,7 +49,7 @@ public class HeartbeatHostedService : IHostedService, IDisposable
while (!cancellationToken.IsCancellationRequested)
{
await _hubContext.Clients.All.SendAsync("Heartbeat");
await Task.Delay(120000);
await Task.Delay(120000, cancellationToken);
}
_logger.LogWarning("Done with heartbeat.");
}