Closed nchapman closed 10 years ago
@nchapman I think sending a message every 45s should be fine, and yes, the server would ignore it. That should keep the connection open in any case.
Websocket is supposed to have an internal 1 byte heartbeat message, but not all clients deal with it correctly. Doing something at the app layer is ugly, but actually safer.
Cool then let's roll with this then! @pdehaan will you peep the code with your special eyes?
LGTM, apart from those 2 questions/comments. If @jrconlin is happy, I'm happy.
Plus Travis is happy, which is... unheard of!
Fixes #225.
@jrconlin, we had originally discussed just sending the tracking command more often, but I realized that won't actually help keep the socket alive if the device isn't responding. So, instead, I'm sending an empty websocket message every 45 seconds. It seems like the server is just ignoring them. I'm not sure it'll actually help keep the connection through the load balancer alive, but it seemed like the simplest solution. What do you think? Want to do something more formalized?