Skip to content
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

Cant resubscribe after reconnect #83

Closed
masterada opened this issue May 24, 2019 · 4 comments
Closed

Cant resubscribe after reconnect #83

masterada opened this issue May 24, 2019 · 4 comments

Comments

@masterada
Copy link

Description

If you subscribe and unsubscribe from a channel, and then a centrifuge reconnect happens, you can no longer subscribe to that channel.

Steps to reproduce

  1. connect centrifuge
  2. subscribe to channel 'test': let sub = centrifuge.subscribe('test', handler)
  3. unsubscribe from channel 'test': sub.unsubscribe()
  4. reconnect centrifuge (eg: network error)
  5. subsribe to channel 'test' again: let sub = centrifuge.subscribe('test', handler)

Expexted:

  • centrifuge subscribes to 'test' channel

Actual:

  • centrifuge won't subscribe to 'test' channel

Other info

Might be related to: #46

After a bit of investigation, i found out that the subsription is stuck in _STATE_SUBSCRIBING:

  1. connect centrifuge
  2. subscribe to channel 'test': let oldSub = centrifuge.subscribe('test', handler)
  3. unsubscribe from channel 'test': oldSub.unsubscribe()
  4. reconnect centrifuge (eg: network error)
  5. check status of oldSub: console.log(oldSub._status) // prints out 1, expected 4
@FZambia
Copy link
Member

FZambia commented May 24, 2019

@masterada hello, many thanks for detailed description and steps to reproduce, will take a look very soon.

@FZambia
Copy link
Member

FZambia commented May 24, 2019

@masterada could you please check library version from dist folder in master branch which already contains fix from f421b6c - I believe it should fix an issue. If it works - will create new release.

@masterada
Copy link
Author

@FZambia thanks for the quick fix, tested with 7e859c0, works fine for me.

@FZambia
Copy link
Member

FZambia commented May 26, 2019

Thanks! Just released 2.1.6

@FZambia FZambia closed this as completed May 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants