anycable / anycable-go

AnyCable real-time server
https://anycable.io
MIT License
375 stars 65 forks source link

fix (subscribe): re-subscribe if already subscribed #142

Closed bradrees closed 2 years ago

bradrees commented 2 years ago

Fixes the issue where the client goes into sleep and cannot reconnect without a full reload. Noticeable on iOS and Electron

Fixes #141

palkan commented 2 years ago

I'm not sure my attached PR fixes anything related to this issue, although it does prevent that 'Already subscribed' message from showing up.

Yeah, I don't think we fix the problem here; just hiding symptoms. Sending subscribe commands when the connection's state already includes this subscription is a client-side misbehavior. We should dig this way.