comparison mercurial/commandserver.py @ 40838:cb372d09d30a

merge with stable
author Augie Fackler <augie@google.com>
date Tue, 04 Dec 2018 17:13:01 -0500
parents 234c2d8c9e48 41f0529b5112
children 368ecbf734af
comparison
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