meteor/meteor — pull request #1865 by awwx (2014-02-26 00:09:01+00:00)
Title: DDP Heartbeats

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.