| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Sorry, something went wrong.
…ose() during premature teardown
|
This adds un-necessary defensive guards for a very rare event. And I don't think it's necessary to have it. I'm closing it because it's premature to do so and I'll Kumar decide on whether he wants to accept the issue. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
An interrupted event loop initialization (e.g. keyboard interrupt or signal received before _make_self_pipe() or proactor setup completes) leaves attributes like _ssock, _csock, _selector, _proactor, and _signal_handlers uninitialized or partially assigned. When garbage collected, BaseEventLoop.__del__ calls self.close() -> _close_self_pipe(), unconditionally dereferencing self._ssock.fileno() and raising an AttributeError via sys.unraisablehook.
This patch guards internal attribute dereferences across BaseSelectorEventLoop, _UnixSelectorEventLoop, and BaseProactorEventLoop during close() and _close_self_pipe(), ensuring partially initialized loops tear down cleanly.
Fixes #158903.