diff --git a/distributed/client.py b/distributed/client.py index bac7fb016a..06999fb599 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())