mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Add "ping" and "pong" messages to DDP. This allows us to detect at the DDP level when we've lost the connection. Bump the DDP version to "pre2". Preserve backwards compatibility by not enabling pings if the negotiated DDP version is an earlier version. Since receiving a ping indicates that the connection is alive, one side of the connection doesn't have to send its own pings as long as its receiving pings from the other side. The ping interval defaults to 30 seconds on the server and 35 seconds on the client, which means that normally the pings go just one way (saving on bandwidth). Increase the sockjs heartbeats from 25s to 45s, so they do not normally fire.