Show More
@@ -16,8 +16,13 b' import socket' | |||||
16 | import struct |
|
16 | import struct | |
17 | import traceback |
|
17 | import traceback | |
18 |
|
18 | |||
|
19 | try: | |||
|
20 | import selectors | |||
|
21 | selectors.BaseSelector | |||
|
22 | except ImportError: | |||
|
23 | from .thirdparty import selectors2 as selectors | |||
|
24 | ||||
19 | from .i18n import _ |
|
25 | from .i18n import _ | |
20 | from .thirdparty import selectors2 |
|
|||
21 | from . import ( |
|
26 | from . import ( | |
22 | encoding, |
|
27 | encoding, | |
23 | error, |
|
28 | error, | |
@@ -476,8 +481,8 b' class unixforkingservice(object):' | |||||
476 | def _mainloop(self): |
|
481 | def _mainloop(self): | |
477 | exiting = False |
|
482 | exiting = False | |
478 | h = self._servicehandler |
|
483 | h = self._servicehandler | |
479 |
selector = selectors |
|
484 | selector = selectors.DefaultSelector() | |
480 |
selector.register(self._sock, selectors |
|
485 | selector.register(self._sock, selectors.EVENT_READ) | |
481 | while True: |
|
486 | while True: | |
482 | if not exiting and h.shouldexit(): |
|
487 | if not exiting and h.shouldexit(): | |
483 | # clients can no longer connect() to the domain socket, so |
|
488 | # clients can no longer connect() to the domain socket, so |
General Comments 0
You need to be logged in to leave comments.
Login now