Commit 15322923 authored by Vincent Pelletier's avatar Vincent Pelletier

Move emitted packet log to end of function.

This way, when called from "ask", displayed timestamp will be closer to
packet's timeout base timestamp.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2362 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 376dd9f7
......@@ -599,12 +599,12 @@ class Connection(BaseConnection):
was_empty = not bool(self.write_buf)
PACKET_LOGGER.dispatch(self, packet, ' to ')
self.write_buf.extend(packet.encode())
if was_empty:
# enable polling for writing.
self.em.addWriter(self)
PACKET_LOGGER.dispatch(self, packet, ' to ')
@not_closed
def notify(self, packet):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment