Skip to content

Commit

Permalink
bugfix - read_loop should be a CooperativeTask, not Deferred
Browse files Browse the repository at this point in the history
  • Loading branch information
daa committed May 19, 2016
1 parent 1df85d1 commit e0ecf93
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions txzmq/connection.py
Expand Up @@ -267,9 +267,8 @@ def doRead(self):
self.read_scheduled.cancel()
self.read_scheduled = None
if self._read_loop is None:
self._read_loop = task.cooperate(self._read_messages()).\
whenDone().\
addBoth(self._read_done)
self._read_loop = task.cooperate(self._read_messages())
self._read_loop.whenDone().addBoth(self._read_done)

def _read_messages(self):
while True:
Expand Down

0 comments on commit e0ecf93

Please sign in to comment.