Guard against None values in Scheduler.comms when cleaning up
This sometimes results in spurious warnings on shutdown.
Fixes
@@ -1164,6 +1164,7 @@ class Scheduler(ServerNode):
finally:
if not comm.closed():
self.comms[client].send({'op': 'stream-closed'})
+ if self.comms[client] is not None:
yield self.comms[client].close()
del self.comms[client]
logger.info("Close client connection: %s", client)
