Permalink
Browse files

Small performance optimization.

  • Loading branch information...
1 parent fa5864d commit 3c51cbaed8a88743a66da8a20182dad0d04b8af0 @mrjoes committed Mar 29, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 tornadio2/persistent.py
@@ -43,6 +43,7 @@ def initialize(self, server):
self.session = None
self._is_active = not self.server.settings['websocket_check']
+ self._global_heartbeats = self.server.settings['global_heartbeats']
logging.debug('Initializing %s handler.' % self.name)
@@ -135,7 +136,7 @@ def on_message(self, message):
self._is_active = True
- if not self.server.settings['global_heartbeats']:
+ if not self._global_heartbeats:
self.session.delay_heartbeat()
try:

0 comments on commit 3c51cba

Please sign in to comment.