mercurial/commandserver.py
changeset 40838 cb372d09d30a
parent 40641 234c2d8c9e48
parent 40450 41f0529b5112
child 40841 368ecbf734af
equal deleted inserted replaced
40837:e13ab4acf555 40838:cb372d09d30a
   524                 # for requests that are queued (connect()-ed, but haven't been
   524                 # for requests that are queued (connect()-ed, but haven't been
   525                 # accept()-ed), handle them before exit. otherwise, clients
   525                 # accept()-ed), handle them before exit. otherwise, clients
   526                 # waiting for recv() will receive ECONNRESET.
   526                 # waiting for recv() will receive ECONNRESET.
   527                 self._unlinksocket()
   527                 self._unlinksocket()
   528                 exiting = True
   528                 exiting = True
   529             ready = selector.select(timeout=h.pollinterval)
   529             try:
       
   530                 ready = selector.select(timeout=h.pollinterval)
       
   531             except OSError as inst:
       
   532                 # selectors2 raises ETIMEDOUT if timeout exceeded while
       
   533                 # handling signal interrupt. That's probably wrong, but
       
   534                 # we can easily get around it.
       
   535                 if inst.errno != errno.ETIMEDOUT:
       
   536                     raise
       
   537                 ready = []
   530             if not ready:
   538             if not ready:
   531                 # only exit if we completed all queued requests
   539                 # only exit if we completed all queued requests
   532                 if exiting:
   540                 if exiting:
   533                     break
   541                     break
   534                 continue
   542                 continue