mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 18:23:37 +02:00
Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
commit
294a17438c
1 changed files with 3 additions and 3 deletions
|
|
@ -130,17 +130,17 @@ def run(self):
|
|||
getattr(self.driver, 'listen_socket', None) is not None:
|
||||
ans = select.select((self.driver.listen_socket,), (), (), 0)
|
||||
if len(ans[0]) > 0:
|
||||
# timeout in 10 ms to detect rare case where the socket went
|
||||
# way between the select and the accept
|
||||
# timeout in 10 ms to detect rare case where the socket goes
|
||||
# away between the select and the accept
|
||||
try:
|
||||
self.driver._debug('attempt to open device socket')
|
||||
device_socket = None
|
||||
self.driver.listen_socket.settimeout(0.010)
|
||||
device_socket, ign = eintr_retry_call(
|
||||
self.driver.listen_socket.accept)
|
||||
set_socket_inherit(device_socket, False)
|
||||
self.driver.listen_socket.settimeout(None)
|
||||
device_socket.settimeout(None)
|
||||
set_socket_inherit(device_socket, False)
|
||||
|
||||
try:
|
||||
self.driver.connection_queue.put_nowait(device_socket)
|
||||
|
|
|
|||
Loading…
Reference in a new issue