ArduinoPusherClient
ArduinoPusherClient copied to clipboard
client stops "listening" after 30-60 minutes
this is an awesome library! I'm trying to use it for a little water turret project (turret.jit.su). I haven't modified any of the connection code from your example, but I'm noticing that after leaving the board on, after roughly an hour it stops responding to messages from Pusher. I'm logging whether or not client.connected() is false in the loop but it it doesn't seem to be the issue (client.connected() is apparently still true while the board is unresponsive).
Do you know what might cause this (where I should start troubleshooting)? Thanks!
The most recent version of the Pusher API send ping
events to check whether your client is still connected. If you don't respond with a pong
it considers you to be disconnected.
See the Pusher documentation, it might help you with your problem :)
Interesting yeah this looks like a good place to start I'll check it out, thanks for the pointer!
On Tue, Jul 3, 2012 at 5:03 PM, Pierre Bouchet < [email protected]
wrote:
The most recent version of the Pusher API send
ping
events to check whether your client is still connected. If you don't respond with apong
it considers you to be disconnected. See the Pusher documentation, it might help you with your problem :)
Reply to this email directly or view it on GitHub:
https://github.com/krohling/ArduinoPusherClient/issues/4#issuecomment-6746438
Just do it like so: if( Pclient.connect(key) ) { Pclient.bind("pusher:ping", pingpong); }
void pingpong(String data) { Pclient.triggerEvent("pusher:pong", "{}"); }