-
-
Notifications
You must be signed in to change notification settings - Fork 758
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
Tibber: resubscribe on clean disconnect #18643
Conversation
@andig I refactored the existing subscription logic into a function (subscribe), and added an optional unsubscribe to it (in case we have a subscriptionId from a previous subscribe). For the reconnect loop, I am using the presence of an error to decide wether to just restart Run() or also additionally re-subscribe. Maybe we can also get rid of that decision by simply always resubscribing? WDYT? |
Ich habs nicht versucht im Detail zu verstehen, aber die Idee ist klar- bin gespannt... |
ping @GrimmiMeloni |
Sorry. Gerade unpässlich 🤒 |
Ohje- gute Besserung! |
de80ca4
to
8eb7282
Compare
Co-authored-by: andig <cpuidle@gmail.com>
Co-authored-by: andig <cpuidle@gmail.com>
Mir fällt grad noch auf:
das ist vmtl. kontraproduktiv mit den Run darunter ;) Zumindest wird dort ja auch schon das Logging mit erledigt. |
Was genau meinst Du wird kontraproduktiv sein? Für den Client ist es zumindest OK wenn dieser hier via Close() parallel geschlossen wird. Der stellt im schlimmsten Fall dann fest, das Ihm der parent Context zwichenzeitlich zugemacht wurde und beendet sich dann direkt wieder. Oder siehst Du hier noch ein anderes Problem? Den Hinweis mit dem Logging verstehe ich nicht. |
fix #17925
Resubscribes in case of a clean exit.