mercurial/commandserver.py
changeset 49280 311fcc5a65f6
parent 48946 642e31cb55f0
child 49302 ee4537e365c8
--- a/mercurial/commandserver.py	Wed Jun 08 15:46:04 2022 +0200
+++ b/mercurial/commandserver.py	Sat May 28 22:08:13 2022 +0200
@@ -10,18 +10,12 @@
 import gc
 import os
 import random
+import selectors
 import signal
 import socket
 import struct
 import traceback
 
-try:
-    import selectors
-
-    selectors.BaseSelector
-except ImportError:
-    from .thirdparty import selectors2 as selectors
-
 from .i18n import _
 from .pycompat import getattr
 from . import (
@@ -644,15 +638,7 @@
                 # waiting for recv() will receive ECONNRESET.
                 self._unlinksocket()
                 exiting = True
-            try:
-                events = selector.select(timeout=h.pollinterval)
-            except OSError as inst:
-                # selectors2 raises ETIMEDOUT if timeout exceeded while
-                # handling signal interrupt. That's probably wrong, but
-                # we can easily get around it.
-                if inst.errno != errno.ETIMEDOUT:
-                    raise
-                events = []
+            events = selector.select(timeout=h.pollinterval)
             if not events:
                 # only exit if we completed all queued requests
                 if exiting: