8000 reset missed heartbeats for any message type · pythonanywhere/tornadio2@22fe606 · GitHub
[go: up one dir, main page]

Skip to content

Commit 22fe606

Browse files
author
Resolver Systems Ltd
committed
reset missed heartbeats for any message type
1 parent 4d18fd9 commit 22fe606

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tornadio2/session.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,8 @@ def raw_message(self, msg):
370370
logging.error('Invalid endpoint: %s' % msg_endpoint)
371371
return
372372

373-
if msg_type == proto.HEARTBEAT:
374-
self._missed_heartbeats = 0
375-
elif msg_type == proto.MESSAGE:
373+
self._missed_heartbeats = 0 # any message is a valid indication of client alive-ness
374+
if msg_type == proto.MESSAGE:
376375
# Handle text message
377376
conn.on_message(msg_data)
378377

0 commit comments

Comments
 (0)
0