From 8a15d91d930b4fa81ea2a16669f13a770515b9de Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 1 Sep 2020 20:04:28 +0100 Subject: [PATCH] timeout --- lgsm/functions/command_dev_query_raw.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/functions/command_dev_query_raw.sh b/lgsm/functions/command_dev_query_raw.sh index a77a5b533..389317db2 100644 --- a/lgsm/functions/command_dev_query_raw.sh +++ b/lgsm/functions/command_dev_query_raw.sh @@ -61,7 +61,7 @@ do echo -e "" echo -e "bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${queryport}''" echo -e "" - bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${queryport}'' + timeout 3 bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${queryport}'' querystatus="$?" echo -e "" if [ "${querystatus}" == "0" ]; then @@ -79,7 +79,7 @@ do echo -e "" echo -e "bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${port}''" echo -e "" - bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${port}'' + timeout 3 bash -c 'exec 3<> /dev/tcp/'${queryip}'/'${port}'' querystatus="$?" echo -e "" if [ "${querystatus}" == "0" ]; then