mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
Add 2s timeout when connecting directly to node
This commit is contained in:
parent
35c69bee27
commit
f32d49ccf9
@ -10172,7 +10172,8 @@ fd_socket() {
|
||||
break
|
||||
fi
|
||||
done
|
||||
elif ! exec 5<>/dev/tcp/$nodeip/$PORT; then # 2>/dev/null would remove an error message, but disables debugging
|
||||
elif ! timeout 2 bash -c "exec 3<>/dev/tcp/$nodeip/$PORT" || \
|
||||
! exec 5<>/dev/tcp/$nodeip/$PORT; then # 2>/dev/null would remove an error message, but disables debugging
|
||||
((NR_SOCKET_FAIL++))
|
||||
connectivity_problem $NR_SOCKET_FAIL $MAX_SOCKET_FAIL "TCP connect problem" "repeated TCP connect problems, giving up"
|
||||
outln
|
||||
|
Loading…
Reference in New Issue
Block a user