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.
pull/178/head
David Wilson 6 years ago
parent 671f753207
commit c34f8dbef3

@ -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

Loading…
Cancel
Save