[Neo-report] r2007 vincent - /trunk/neo/connection.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Apr 22 16:37:59 CEST 2010
Author: vincent
Date: Thu Apr 22 16:37:59 2010
New Revision: 2007
Log:
Document why _timeout.update must be called.
This code appeared obscure upon second read, so I document it.
Modified:
trunk/neo/connection.py
Modified: trunk/neo/connection.py
==============================================================================
--- trunk/neo/connection.py [iso-8859-1] (original)
+++ trunk/neo/connection.py [iso-8859-1] Thu Apr 22 16:37:59 2010
@@ -490,6 +490,7 @@
msg_id = self._getNextId()
packet.setId(msg_id)
self._addPacket(packet)
+ # If there is no pending request, initialise timeout values.
if not self._handlers.isPending():
self._timeout.update(time(), timeout=timeout)
self._handlers.emit(packet)
@@ -610,6 +611,7 @@
packet.setId(msg_id)
self.dispatcher.register(self, msg_id, self._local_var.queue)
self._addPacket(packet)
+ # If there is no pending request, initialise timeout values.
if not self._handlers.isPending():
self._timeout.update(time(), timeout=timeout)
self._handlers.emit(packet)
More information about the Neo-report
mailing list