From 42276f158b931b6ce6a29c39bfb722817aac24f9 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Wed, 4 Jul 2018 15:46:04 +0100 Subject: [PATCH] core: log the data received on the latch file handle. --- mitogen/core.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mitogen/core.py b/mitogen/core.py index 6bed7132..cccf2dfe 100644 --- a/mitogen/core.py +++ b/mitogen/core.py @@ -1258,8 +1258,10 @@ class Latch(object): if i >= self._waking: raise e or TimeoutError() self._waking -= 1 - if rsock.recv(2) != b('\x7f'): - raise LatchError('internal error: received >1 wakeups') + byte = rsock.recv(10) + if byte != b('\x7f'): + raise LatchError('internal error: received >1 wakeups: %r' + % (byte,)) if e: raise e if self.closed: