diff --git a/Lib/selectors.py b/Lib/selectors.py index 3e6c2adcb58..3638e8544c6 100644 --- a/Lib/selectors.py +++ b/Lib/selectors.py @@ -351,8 +351,8 @@ def select(self, timeout=None): return ready def close(self): - super().close() self._epoll.close() + super().close() if hasattr(select, 'kqueue'): @@ -414,8 +414,8 @@ def select(self, timeout=None): return ready def close(self): - super().close() self._kqueue.close() + super().close() # Choose the best implementation: roughly, epoll|kqueue > poll > select.