equal
deleted
inserted
replaced
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 |