adamvr/MQTT.js — pull request #146 by keithamus (2013-11-25 12:19:35+00:00)
Title: Ensure client attempts a reconnect on no PINGRESP

Fixes #144

On every PINGREQ it sets `this.pingResp` to `false`, then if `this.pingResp` is still false by the next pingreq interval, it resets the connection. `this.pingResp` is set to true for the first ping.

Then, there is a handler on PINGRESPs which simply sets `this.pingResp` to true, so that a successful pingresp can be noted.

I'm not 100% happy with the tests - while they do test the functionality they're very "side-effecty".