From 353bd34a6df21df9475398dbbd86bb9fb2b33922 Mon Sep 17 00:00:00 2001 From: fjetter Date: Tue, 6 Jul 2021 18:26:18 +0200 Subject: [PATCH] reinstante the await self in handle_comm If not awaited, the server might server handlers before the server is properly initialized. For instance plugins and preload modules might not be fully loaded before that happens --- distributed/core.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/distributed/core.py b/distributed/core.py index 2f72dfee7a..0246020aef 100644 --- a/distributed/core.py +++ b/distributed/core.py @@ -438,6 +438,10 @@ async def handle_comm(self, comm): logger.debug("Connection from %r to %s", address, type(self).__name__) self._comms[comm] = op + # The server might already be listening even though it is not properly + # started, yet. (e.g. preload modules not done) + await self + try: while True: try: