From 3b7745ada4df5cbaec63bda6ed11bd028a52bc11 Mon Sep 17 00:00:00 2001 From: Morris Tabor <80684659+mortarroad@users.noreply.github.com> Date: Sat, 13 Jun 2026 16:36:04 +0200 Subject: [PATCH] fix: Exception on server disconnect --- Buttplug/Client/ButtplugWebsocketConnector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Buttplug/Client/ButtplugWebsocketConnector.cs b/Buttplug/Client/ButtplugWebsocketConnector.cs index 074df1c8..c7cd5c95 100644 --- a/Buttplug/Client/ButtplugWebsocketConnector.cs +++ b/Buttplug/Client/ButtplugWebsocketConnector.cs @@ -132,7 +132,7 @@ private async Task RunClientLoop(CancellationToken token) if (_wsClient != null) { // Clean up the websocket and fire the disconnection event. - _wsClient.CloseAsync(WebSocketCloseStatus.NormalClosure, "Closing", CancellationToken.None).Dispose(); + _ = _wsClient.CloseAsync(WebSocketCloseStatus.NormalClosure, "Closing", CancellationToken.None); _wsClient = null; } // If we somehow still have some live messages, throw exceptions so they aren't stuck.