Fix SocketPipe:
* add errcode 35 for BSD * in addition, add a very long timeout to command line pipe, in order to prevent that exception to be raised.
This commit is contained in:
parent
ebddbcb805
commit
4655c5f565
2
electrum
2
electrum
|
@ -510,7 +510,7 @@ if __name__ == '__main__':
|
||||||
s = get_daemon(config, False)
|
s = get_daemon(config, False)
|
||||||
if s:
|
if s:
|
||||||
p = util.SocketPipe(s)
|
p = util.SocketPipe(s)
|
||||||
p.set_timeout(False)
|
p.set_timeout(1000000)
|
||||||
p.send(config_options)
|
p.send(config_options)
|
||||||
result = p.get()
|
result = p.get()
|
||||||
s.close()
|
s.close()
|
||||||
|
|
|
@ -403,7 +403,7 @@ class SocketPipe:
|
||||||
except socket.error, err:
|
except socket.error, err:
|
||||||
if err.errno == 60:
|
if err.errno == 60:
|
||||||
raise timeout
|
raise timeout
|
||||||
elif err.errno in [11, 10035]:
|
elif err.errno in [11, 35, 10035]:
|
||||||
print_error("socket errno", err.errno)
|
print_error("socket errno", err.errno)
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue