This commit is contained in:
Kovid Goyal 2012-07-31 17:55:54 +05:30
parent 4b13f6079b
commit ca05e82c1b

View File

@ -460,12 +460,12 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin):
ans = select.select((self.listen_socket,), (), (), 0) ans = select.select((self.listen_socket,), (), (), 0)
if len(ans[0]) > 0: if len(ans[0]) > 0:
# timeout in 10 ms to detect rare case where the socket went # timeout in 10 ms to detect rare case where the socket went
# way between the select and the accent # way between the select and the accept
try: try:
self.device_socket = None self.device_socket = None
self.listen_socket.settimeout(0.010) self.listen_socket.settimeout(0.010)
self.device_socket, ign = \ self.device_socket, ign = eintr_retry_call(
eintr_retry_call(self.listen_socket.accept) self.listen_socket.accept)
self.listen_socket.settimeout(None) self.listen_socket.settimeout(None)
self.device_socket.settimeout(None) self.device_socket.settimeout(None)
self.is_connected = True self.is_connected = True