diff --git a/src/Nullinside.Api.Common/Twitch/TwitchClientProxy.cs b/src/Nullinside.Api.Common/Twitch/TwitchClientProxy.cs index 7a73b0c..ac3029f 100644 --- a/src/Nullinside.Api.Common/Twitch/TwitchClientProxy.cs +++ b/src/Nullinside.Api.Common/Twitch/TwitchClientProxy.cs @@ -108,10 +108,15 @@ public static TwitchClientProxy Instance { public string? TwitchOAuthToken { get => _twitchOAuthToken; set { + if (value == _twitchOAuthToken) { + return; + } + _twitchOAuthToken = value; // If we have a client, try to connect. if (null != _client) { + _client.Disconnect(); _client.SetConnectionCredentials(new ConnectionCredentials(TwitchUsername, value)); Connect(); }