fix: Connection deadlock when trying to Send and Disconnect (#1872)
This commit is contained in:
@@ -188,9 +188,9 @@ namespace Discord.API
|
||||
catch { }
|
||||
|
||||
if (ex is GatewayReconnectException)
|
||||
await WebSocketClient.DisconnectAsync(4000);
|
||||
await WebSocketClient.DisconnectAsync(4000).ConfigureAwait(false);
|
||||
else
|
||||
await WebSocketClient.DisconnectAsync().ConfigureAwait(false);
|
||||
await WebSocketClient.DisconnectAsync().ConfigureAwait(false);
|
||||
|
||||
ConnectionState = ConnectionState.Disconnected;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user