Commit c39c3478 authored by Vincent Pelletier's avatar Vincent Pelletier

Lock connection before handling packet in _handlePacket.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2037 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent cf90e63e
...@@ -202,7 +202,11 @@ class Application(object): ...@@ -202,7 +202,11 @@ class Application(object):
handler = self.primary_handler handler = self.primary_handler
else: else:
raise ValueError, 'Unknown node type: %r' % (node.__class__, ) raise ValueError, 'Unknown node type: %r' % (node.__class__, )
handler.dispatch(conn, packet) conn.lock()
try:
handler.dispatch(conn, packet)
finally:
conn.unlock()
@profiler_decorator @profiler_decorator
def _waitAnyMessage(self, block=True): def _waitAnyMessage(self, block=True):
......
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