From 546b1d161a2318100e8d8ca3aeeda05e1d812cae Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Fri, 26 Jul 2024 11:28:52 +1000 Subject: [PATCH] Replace SendInstant with Send as it's more thread safe or something --- KfChatDotNetKickBot/Services/Howlgg.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/KfChatDotNetKickBot/Services/Howlgg.cs b/KfChatDotNetKickBot/Services/Howlgg.cs index 574a366..c59005a 100644 --- a/KfChatDotNetKickBot/Services/Howlgg.cs +++ b/KfChatDotNetKickBot/Services/Howlgg.cs @@ -77,7 +77,7 @@ public class Howlgg : IDisposable { var packet = "42/main,0[\"getUserInfo\",{\"userOrSteamId\":\"" + userId + "\",\"interval\":\"lifetime\"}]"; _logger.Debug($"Sending packet: {packet}"); - _wsClient.SendInstant(packet).Wait(_cancellationToken); + _wsClient.Send(packet); } private async Task HeartbeatTimer() @@ -91,7 +91,7 @@ public class Howlgg : IDisposable continue; } _logger.Debug("Sending Howl.gg ping packet"); - await _wsClient.SendInstant("2"); + _wsClient.Send("2"); } } @@ -141,7 +141,7 @@ public class Howlgg : IDisposable if (message.Text == "40") { _logger.Trace("Ready to subscribe, sending main subscription"); - _wsClient.SendInstant("40/main,").Wait(_cancellationToken); + _wsClient.Send("40/main,"); // To indicate successful subscription it echoes back the channel to you return; }