Let a connector's teardown cancellation through too

ConnectorNode.stop cancelled its poll task and then caught CancelledError
around the await — the fourth site of the trap f002e21 closed elsewhere,
swallowing a cancellation aimed at whoever asked for the teardown. It now
calls the shared Node._cancel_task, which keeps retrieving whatever the
loop raised on its way out, as the old `except (CancelledError, Exception)`
did.
This commit is contained in:
2026-08-28 11:56:19 +02:00
parent f4fd26e44d
commit 7d585bbb38
2 changed files with 27 additions and 12 deletions
+1 -5
View File
@@ -161,11 +161,7 @@ class ConnectorNode(Node):
return
self._stop_event.set()
if self._poll_task is not None:
self._poll_task.cancel()
try:
await self._poll_task
except (asyncio.CancelledError, Exception): # noqa: B014 - shutting down
pass
await self._cancel_task(self._poll_task)
self._poll_task = None
self._stop_event = None
self._last_published = {}