diff options
Diffstat (limited to 'test/security')
-rwxr-xr-x | test/security/check_for_jdwp.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/security/check_for_jdwp.sh b/test/security/check_for_jdwp.sh index 7bcbade64..0facbff69 100755 --- a/test/security/check_for_jdwp.sh +++ b/test/security/check_for_jdwp.sh @@ -47,7 +47,8 @@ do_jdwp_handshake() { local jdwp_challenge="JDWP-Handshake\n" local jdwp_response="JDWP-Handshake" - local response=`nc $ip $port <<<$jdwp_challenge` + # 10s timeout to avoid hangs when service doesn't answer at all + local response=`nc -w 10 $ip $port <<<$jdwp_challenge | tr '\0' '\n'` if [[ $response == *"$jdwp_response"* ]]; then return 0 fi |