rails
rails copied to clipboard
Trigger `reconnected()` callback after reconnects
Summary
The purpose is to allow subscribers to handle reconnects by defining a reconnected()
callback:
import consumer from "./consumer"
consumer.subscriptions.create("ExampleChannel", {
...
reconnected() {
// Called when the subscription is confirmed after a reconnect
},
});
That's useful if a subscriber misses some messages when the connection is lost.
Thanks!
Thanks!
Thanks @byroot for reviewing my first merged PR!
Hi @mansakondo, I think this is missing an entry to the actioncable/CHANGELOG. Could you create a PR to add it?
Hi @mansakondo, I think this is missing an entry to the actioncable/CHANGELOG. Could you create a PR to add it?
Oh yeah, I forgot. Sure no problem.