core: if Poller.poll() fails, TimeoutError would be raised.

We must check whether poller threw an exception both in the case that we
weren't woken and the case that we were.
This commit is contained in:
David Wilson 2018-05-15 04:18:55 +01:00
parent 5bdc1719c5
commit 05a5f2b6e5
1 changed files with 1 additions and 1 deletions

View File

@ -1153,7 +1153,7 @@ class Latch(object):
del self._sleeping[i]
self._sockets.append((rsock, wsock))
if i >= self._waking:
raise TimeoutError()
raise e or TimeoutError()
self._waking -= 1
if rsock.recv(2) != '\x7f':
raise LatchError('internal error: received >1 wakeups')