-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random disconnect #114
Comments
Probably the same issue as in #111 which I also still encounter. Someone there said they got around it but I had no success yet. I tried to implement what they suggested as follows: private static async void OnPubSubServiceError(object sender, OnPubSubServiceErrorArgs e)
{
[...]
await Task.Delay(30000);
CreatePubSubListenEvents();
TwitchPubSub.Connect();
}
private static void CreatePubSubListenEvents()
{
TwitchPubSub.ListenToVideoPlayback(Settings.Settings.TwitchChannelId);
TwitchPubSub.ListenToChannelPoints(Settings.Settings.TwitchChannelId);
}
private static void OnPubSubServiceConnected(object sender, EventArgs e)
{
TwitchPubSub.SendTopics(Settings.Settings.TwitchAccessToken);
} Either I'm dumb and did not do as they described or the issue still exists. And the exceptions is always
|
Same issue happened to me, and it's in the log as a 'reconnect', then nothing. I found this: https://github.com/TwitchLib/TwitchLib.PubSub/blob/master/TwitchLib.PubSub/TwitchPubSub.cs#L675 Currently, there isn't any 'reconnect' handling nor notification beyond the logger, that I'm aware. I'm currently trying to figure out how to respond to a disconnect/reconnect. Maybe parse the log message, though the most efficient (but cumbersome to match library updates) would be to pull-in the code (attribution of course), and add-on reconnect handling. At the least, the 'reconnect' message could fire the 'OnDisconnect' event to at least tell us we need to manage reconnecting PubSub. (I purposely don't directly code contribute so my code references a framework API, in a reliance sort of way. I've sometimes had to pull code to add some corrections- like http disruption exceptions not in 'try/catch' library code, add some features or add another service). |
There is this PR which is also resolving this as it seems: TwitchLib/TwitchLib.Communication#17 |
Can anyone help me understand why Pubsub is constantly disconnected without any errors, everything just stops working, it doesn't listen to 1 event. What am I doing wrong? lol
The text was updated successfully, but these errors were encountered: