timeout für reachable 2s

This commit is contained in:
Jakobus Schürz 2020-10-06 14:11:02 +02:00
parent 858180bd8d
commit c2e4e8ed7c

View file

@ -678,7 +678,7 @@ reachable-default () {
local SERVER=$1
local PORT=${2:-22}
local res=3
if nc -z $SERVER $PORT 2>/dev/null; then
if nc -w 2 -z $SERVER $PORT 2>/dev/null; then
res=0
fi
return $res