Don't update last ping time on data received
commit31f6df3a5ec41af93d9c2e432c19f64973257d1e
authorThomas Perl <m@thp.io>
Thu, 19 Jan 2012 11:43:43 +0000 (19 12:43 +0100)
committerThomas Perl <m@thp.io>
Thu, 19 Jan 2012 11:43:43 +0000 (19 12:43 +0100)
treef1e1968642f68ea0a9504054267e85172c2ddd0d
parentea85a20cf5a44720b41c14a214b98b64ddd981ba
Don't update last ping time on data received

Thanks to Nam Nguyen for reporting this issue.

Quoting from https://github.com/1stvamp/hippybot/issues/2:

Apparently the problem is with JabberBot's handling of its private
__lastping variable. It resets this variable when it receives a packet
from the server. I suppose this might be reasonable with other jabberd
but, as explained by @powdahound, Hipchat only counts the packets that
are sent from client, not packets that Hipchat itself has sent. So there
might be times when the if statement will fail because time.time() -
self.__JabberBot_lastping is less than PING_FREQUENCY.
jabberbot.py