From 4099322ce2b44562f20f4ee2350e21a85c807dae Mon Sep 17 00:00:00 2001 From: Tom Date: Tue, 14 Jan 2025 01:21:11 +0000 Subject: [PATCH] Undo the connection change for Hermes client. --- Hermes/Socket/HermesSocketClient.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Hermes/Socket/HermesSocketClient.cs b/Hermes/Socket/HermesSocketClient.cs index f4bdd90..9425849 100644 --- a/Hermes/Socket/HermesSocketClient.cs +++ b/Hermes/Socket/HermesSocketClient.cs @@ -34,7 +34,6 @@ namespace TwitchChatTTS.Hermes.Socket public bool LoggedIn { get; set; } public bool Ready { get; set; } - private bool _attempting; public HermesSocketClient( @@ -85,29 +84,23 @@ namespace TwitchChatTTS.Hermes.Socket { lock (_lock) { - if (Connected || _attempting) + if (Connected) return; - - _attempting = true; } _logger.Debug($"Attempting to connect to {URL}"); await ConnectAsync(URL); - _attempting = false; } private async Task Disconnect() { lock (_lock) { - if (!Connected || _attempting) + if (!Connected) return; - - _attempting = true; } await DisconnectAsync(new SocketDisconnectionEventArgs("Normal disconnection", "Disconnection was executed")); - _attempting = false; } public async Task CreateTTSVoice(string voiceName)