mrroach9/Rowell — pull request #24 by HenryHu (2014-05-20 18:01:18+00:00)
Title: reset watchdog timer in sendCommand. fix disconnect problem

jquery.xmpp resets a timer before starting the long polling in listen(). In this way, if the long polling fails, it would be notified by the timer timeout.
However, long polling is also started in sendCommand(). If a call to listen() is followed by several calls to sendCommand(), the timer would not be reseted, and it may times out without an error.
By also resetting the timer in sendCommand(), as long as the connection is alive, the timer would always be resetted before a long polling.
Because the system reconnects when disconnected, the timer would not time out during the reconnected period.
An alternative way to achieve this may be setting the timer before the request and clearing it when the request succeeds/fails.