diff --git a/rpyc/core/protocol.py b/rpyc/core/protocol.py index 048eca1c..69643c72 100644 --- a/rpyc/core/protocol.py +++ b/rpyc/core/protocol.py @@ -432,7 +432,7 @@ def serve(self, timeout=1, wait_for_lock=True): # serving else: return False # Assume the receive rlock is acquired and incremented - # We must release once, dispatch any data, and THEN notify all (see issue #527 and #449) + # We must release once BEFORE dispatch, dispatch any data, and THEN notify all (see issue #527 and #449) try: data = None # Ensure data is initialized data = self._channel.poll(timeout) and self._channel.recv()