From 22fe6064281399480dbf5e538e987bad41039913 Mon Sep 17 00:00:00 2001 From: Resolver Systems Ltd Date: Wed, 7 Mar 2012 16:30:26 +0000 Subject: [PATCH] reset missed heartbeats for any message type --- tornadio2/session.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tornadio2/session.py b/tornadio2/session.py index b1ce039..ce287c5 100644 --- a/tornadio2/session.py +++ b/tornadio2/session.py @@ -370,9 +370,8 @@ def raw_message(self, msg): logging.error('Invalid endpoint: %s' % msg_endpoint) return - if msg_type == proto.HEARTBEAT: - self._missed_heartbeats = 0 - elif msg_type == proto.MESSAGE: + self._missed_heartbeats = 0 # any message is a valid indication of client alive-ness + if msg_type == proto.MESSAGE: # Handle text message conn.on_message(msg_data)