mercurial/commandserver.py
branchstable
changeset 40788 41f0529b5112
parent 40361 b7de186efd82
child 40819 cb372d09d30a
equal deleted inserted replaced
40787:d1bda397df73 40788:41f0529b5112
   470                 # for requests that are queued (connect()-ed, but haven't been
   470                 # for requests that are queued (connect()-ed, but haven't been
   471                 # accept()-ed), handle them before exit. otherwise, clients
   471                 # accept()-ed), handle them before exit. otherwise, clients
   472                 # waiting for recv() will receive ECONNRESET.
   472                 # waiting for recv() will receive ECONNRESET.
   473                 self._unlinksocket()
   473                 self._unlinksocket()
   474                 exiting = True
   474                 exiting = True
   475             ready = selector.select(timeout=h.pollinterval)
   475             try:
       
   476                 ready = selector.select(timeout=h.pollinterval)
       
   477             except OSError as inst:
       
   478                 # selectors2 raises ETIMEDOUT if timeout exceeded while
       
   479                 # handling signal interrupt. That's probably wrong, but
       
   480                 # we can easily get around it.
       
   481                 if inst.errno != errno.ETIMEDOUT:
       
   482                     raise
       
   483                 ready = []
   476             if not ready:
   484             if not ready:
   477                 # only exit if we completed all queued requests
   485                 # only exit if we completed all queued requests
   478                 if exiting:
   486                 if exiting:
   479                     break
   487                     break
   480                 continue
   488                 continue