From 85bd4e3b2c5b1c6185ba15ccbc5a1b8fc970179e Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Mon, 2 Sep 2024 20:47:57 +0800 Subject: [PATCH] Corrected omission where KfClient would not be populated with the newly retrieved token after refreshing it and get caught in a reconnect loop. --- KfChatDotNetBot/ChatBot.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/KfChatDotNetBot/ChatBot.cs b/KfChatDotNetBot/ChatBot.cs index 3a5666d..b31c05f 100644 --- a/KfChatDotNetBot/ChatBot.cs +++ b/KfChatDotNetBot/ChatBot.cs @@ -126,6 +126,7 @@ public class ChatBot await Helpers.GetMultipleValues([BuiltIn.Keys.KiwiFarmsUsername, BuiltIn.Keys.KiwiFarmsPassword]); await _kfTokenService.PerformLogin(settings[BuiltIn.Keys.KiwiFarmsUsername].Value!, settings[BuiltIn.Keys.KiwiFarmsPassword].Value!); + KfClient.UpdateToken(_kfTokenService.GetXfSessionCookie()!); await _kfTokenService.SaveCookies(); _logger.Info("Successfully logged in"); }