You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using this library to communicate with Pusher from a Mac server. Unfortunately, when the server goes to sleep and is woken back up, the resetActivityCheck method calls its waitingTimeout. This wouldn't be a big deal, except the waitingTimeout doesn't actually seem to disconnect; it only unsubscribes from the connected channels. Here's the relevant code (from lib/pusher-node-client.coffee):
@waitingTimeout=setTimeout(
() =>console.log"disconnecting because of inactivity at #{(newDate).toLocaleTimeString()}"_(@channels).each (channel) =>@unsubscribechannel.channel_name, channel.channel_dataconsole.log"connetcing again at #{(newDate).toLocaleTimeString()}"if@connection.stateisnt"open"@connect()
30000
)
Is this intended behavior? If so, it would probably make sense to emit another event, so consumer code can know it should attempt to reconnect to any appropriate channels. If you'd like, I can make this change and submit a PR, or you can let me know if there's another solution you'd like implemented.
Thanks!
-paul
The text was updated successfully, but these errors were encountered:
I'm running into a similar issue. After a long connection to a Pusher feed, the channel will stop responding, but the state of the connection object remains "open" so the following connect statement never gets called:
if (_this.connection.state !== "open") {
return _this.connect();
}
Also, nothing happens after this except the channels being unsubscribed. What paulstraw mentioned above would be great so I could reconnect to pusher and do other things as well.
Hi there!
I'm using this library to communicate with Pusher from a Mac server. Unfortunately, when the server goes to sleep and is woken back up, the
resetActivityCheck
method calls itswaitingTimeout
. This wouldn't be a big deal, except thewaitingTimeout
doesn't actually seem to disconnect; it only unsubscribes from the connected channels. Here's the relevant code (fromlib/pusher-node-client.coffee
):Is this intended behavior? If so, it would probably make sense to emit another event, so consumer code can know it should attempt to reconnect to any appropriate channels. If you'd like, I can make this change and submit a PR, or you can let me know if there's another solution you'd like implemented.
Thanks!
-paul
The text was updated successfully, but these errors were encountered: