We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ba0637 commit 5ff5d11Copy full SHA for 5ff5d11
Lib/asyncio/unix_events.py
@@ -65,10 +65,13 @@ def close(self):
65
for sig in list(self._signal_handlers):
66
self.remove_signal_handler(sig)
67
else:
68
- warinigs.warn(f"Closing the loop {self!r} on interpreter shutdown "
69
- f"stage, signal unsubsription is disabled",
70
- ResourceWarning,
71
- source=self)
+ if self._signal_handlers:
+ warinigs.warn(f"Closing the loop {self!r} "
+ f"on interpreter shutdown "
+ f"stage, signal unsubsription is disabled",
72
+ ResourceWarning,
73
+ source=self)
74
+ self._signal_handlers.clear()
75
76
def _process_self_data(self, data):
77
for signum in data:
0 commit comments