Skip to content

Commit 4036eff

Browse files
Merge pull request #97 from nullinside-development-group/feat/update
fix: unhandle exception throwing when disconnecting
2 parents 86c1e62 + ac7c579 commit 4036eff

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,11 @@ public string? TwitchOAuthToken {
117117
// If we have a client, try to connect.
118118
if (null != _client) {
119119
_client.Disconnect();
120-
_client.SetConnectionCredentials(new ConnectionCredentials(TwitchUsername, value));
121-
Connect();
120+
121+
if (null != value) {
122+
_client.SetConnectionCredentials(new ConnectionCredentials(TwitchUsername, value));
123+
Connect();
124+
}
122125
}
123126
}
124127
}

0 commit comments

Comments
 (0)