mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-30 00:22:40 +01:00
Fix chat provider race condition
Reconnection attempts could still be made if the job starts as the provider was disconnecting. Stop the reconnection timer before attempting a disconnect.
This commit is contained in:
@@ -103,13 +103,13 @@ namespace Tgstation.Server.Host.Components.Chat.Providers
|
||||
/// <inheritdoc />
|
||||
public async Task Disconnect(CancellationToken cancellationToken)
|
||||
{
|
||||
await StopReconnectionTimer().ConfigureAwait(false);
|
||||
|
||||
if (Connected)
|
||||
{
|
||||
await DisconnectImpl(cancellationToken).ConfigureAwait(false);
|
||||
Logger.LogTrace("Disconnected");
|
||||
}
|
||||
|
||||
await StopReconnectionTimer().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in New Issue
Block a user