Merge "Reduce socket connect timeout in nodescan"

This commit is contained in:
Zuul 2018-10-24 12:14:49 +00:00 committed by Gerrit Code Review
commit a8181c09a3
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ def nodescan(ip, port=22, timeout=60, gather_hostkeys=True):
t = None
try:
sock = socket.socket(family, socket.SOCK_STREAM)
sock.settimeout(timeout)
sock.settimeout(10)
sock.connect(sockaddr)
if gather_hostkeys:
t = paramiko.transport.Transport(sock)