Lower the retry timer for waiting for a server to come in

Since all we're doing is waiting on a socket, it's a little crazy
to wait 30s between tries. This makes salt-cloud really slow.
This commit is contained in:
Mike Place 2016-08-27 00:43:35 +09:00
parent bd0790f5f7
commit f44d347a7c

View File

@ -654,7 +654,7 @@ def wait_for_port(host, port=22, timeout=900, gateway=None):
except socket.error:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
sock.settimeout(30)
sock.settimeout(2)
sock.connect((test_ssh_host, int(test_ssh_port)))
# Stop any remaining reads/writes on the socket
sock.shutdown(socket.SHUT_RDWR)