Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ActionCableSubscription#perform now returns a promise
So this deviates from the ActionCable JS client a where it returns a boolean: https://github.com/rails/rails/blob/242216803ee73f528b0a74c6bdb367e5b98d8f83/actioncable/app/assets/javascripts/action_cable.js#L318 Long trace of ActionCable.Subscriptions -> ActionCable.Consumer: https://github.com/rails/rails/blob/242216803ee73f528b0a74c6bdb367e5b98d8f83/actioncable/app/assets/javascripts/action_cable.js#L140 But for our purposes, we noticed sometimes AnyCable's ActionCableSubscription#perform is called on a closed subscription and raises an error (should now be adjustable in 0.9.2 thanks!), but it would be nice to catch and handle those errors. Channel#perform already surfaces the promise, so why not just surface it one more level? https://github.com/anycable/anycable-client/blob/62674a8207b6add893677369106766c7baa234f4/packages/core/channel/index.js#L120
- Loading branch information