aboutsummaryrefslogtreecommitdiffstats
path: root/test/security/check_for_jdwp.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/security/check_for_jdwp.sh')
-rwxr-xr-xtest/security/check_for_jdwp.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/security/check_for_jdwp.sh b/test/security/check_for_jdwp.sh
index 0facbff69..e79f712bf 100755
--- a/test/security/check_for_jdwp.sh
+++ b/test/security/check_for_jdwp.sh
@@ -49,7 +49,8 @@ do_jdwp_handshake() {
# 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
+ local n_response_lines=`echo "$response" | wc -l`
+ if [[ "$n_response_lines" -le 1 ]] && [[ $response == *"$jdwp_response"* ]]; then
return 0
fi