Commit c34f8dbe authored by David Wilson's avatar David Wilson

core: Fix Receiver.__iter__ loop termination.

Since the Message refactoring from a few weeks back, __iter__ has had
nothing to throw ChannelError if the remote sent _DEAD.
parent 671f7532
......@@ -416,6 +416,7 @@ class Receiver(object):
if msg == _DEAD:
raise ChannelError(ChannelError.local_msg)
msg.unpickle() # Cause .remote_msg to be thrown.
return msg
def __iter__(self):
......@@ -1006,6 +1007,7 @@ class Latch(object):
if self.closed:
raise LatchError()
self._queue.append(obj)
if self._waking < len(self._sleeping):
sock = self._sleeping[self._waking]
self._waking += 1
......
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