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 4856b0f commit 4f146f9Copy full SHA for 4f146f9
Lib/asyncio/unix_events.py
@@ -55,10 +55,13 @@ def close(self):
55
for sig in list(self._signal_handlers):
56
self.remove_signal_handler(sig)
57
else:
58
- warinigs.warn(f"Closing the loop {self!r} on interpreter shutdown "
59
- f"stage, signal unsubsription is disabled",
60
- ResourceWarning,
61
- source=self)
+ if self._signal_handlers:
+ warinigs.warn(f"Closing the loop {self!r} "
+ f"on interpreter shutdown "
+ f"stage, signal unsubsription is disabled",
62
+ ResourceWarning,
63
+ source=self)
64
+ self._signal_handlers.clear()
65
66
def _process_self_data(self, data):
67
for signum in data:
0 commit comments