Skip to content

Commit 2ce470f

Browse files
Merge pull request #94 from nullinside-development-group/fix/auth
fix: error message when changing credentials
2 parents b5e34a7 + 6994eda commit 2ce470f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Nullinside.Api.Common/Twitch/TwitchClientProxy.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,15 @@ public static TwitchClientProxy Instance {
108108
public string? TwitchOAuthToken {
109109
get => _twitchOAuthToken;
110110
set {
111+
if (value == _twitchOAuthToken) {
112+
return;
113+
}
114+
111115
_twitchOAuthToken = value;
112116

113117
// If we have a client, try to connect.
114118
if (null != _client) {
119+
_client.Disconnect();
115120
_client.SetConnectionCredentials(new ConnectionCredentials(TwitchUsername, value));
116121
Connect();
117122
}

0 commit comments

Comments
 (0)