1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-03 09:02:48 -05: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

View File

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