DesertBus/txircd — pull request #159 by ElementalAlchemist (2013-06-13 22:30:46+00:00)
Title: Fix the PING loop function

I started seeing clients get disconnected randomly for no conceivable reason, but then I realized: LoopingCall is not anywhere remotely close to consistent in how often it calls. I added some debug statements and found that it can call anywhere from every interval (normal) to every 4-6 intervals (quite common; not a lot, but enough to be problematic) to 9 or even 27 intervals (that happened once!).
This fix makes it correct for the number of times it didn't send PING when checking for the last PONG time.