mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Spin for connection success also when socket is not (yet) available
We were spinning for socket connection if attempt to connect returned errno 111 (connection refused). However, it is not enough for local AF_UNIX sockets as heavy applications might not be able to start yet and therefore the whole path might be missing. So spin for errno 2 (no such file or directory) as well. Partial fix for https://fedorahosted.org/freeipa/ticket/1990
This commit is contained in:
parent
25d5d7ed93
commit
109571d384
@ -508,7 +508,7 @@ def wait_for_open_socket(socket_name, timeout=0):
|
||||
s.close()
|
||||
break;
|
||||
except socket.error, e:
|
||||
if e.errno == 111: # 111: Connection refused
|
||||
if e.errno in (2,111): # 111: Connection refused, 2: File not found
|
||||
if timeout and time.time() > op_timeout: # timeout exceeded
|
||||
raise e
|
||||
time.sleep(1)
|
||||
|
Loading…
Reference in New Issue
Block a user