From 5a14053b152bf73960afc5d0f3768bc70bd5124c Mon Sep 17 00:00:00 2001 From: Gabe Joseph Date: Tue, 1 Nov 2022 10:02:33 -0600 Subject: [PATCH] Fix `_update_scheduler_info` hanging failed tests (#7225) --- distributed/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distributed/client.py b/distributed/client.py index bac7fb016a8..06999fb5991 100644 --- a/distributed/client.py +++ b/distributed/client.py @@ -1361,7 +1361,7 @@ async def _ensure_connected(self, timeout=None): logger.debug("Started scheduling coroutines. Synchronized") async def _update_scheduler_info(self): - if self.status not in ("running", "connecting"): + if self.status not in ("running", "connecting") or self.scheduler is None: return try: self._scheduler_identity = SchedulerInfo(await self.scheduler.identity())