Added up to 3 seconds of wait time for Twitch Id to load in when connecting to Twitch websocket server.

This commit is contained in:
Tom 2024-08-07 22:11:09 +00:00
parent 6eb927ce5f
commit ca5b1c0733

View File

@ -31,6 +31,10 @@ namespace TwitchChatTTS.Twitch.Socket.Handlers
return; return;
} }
int waited = 0;
while (_user.TwitchUserId <= 0 && ++waited < 3)
await Task.Delay(TimeSpan.FromSeconds(1));
try try
{ {
await _hermes.AuthorizeTwitch(); await _hermes.AuthorizeTwitch();