mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-06 00:39:44 +01:00
Merge pull request #730 from typingArtist/729_catch_read_timeout
correctly capture return code in starttls_full_read
This commit is contained in:
commit
53da6da77b
@ -6848,7 +6848,7 @@ starttls_full_read(){
|
|||||||
|
|
||||||
local oldIFS="$IFS"
|
local oldIFS="$IFS"
|
||||||
IFS=''
|
IFS=''
|
||||||
while read -r -t $STARTTLS_SLEEP one_line; do
|
while read -r -t $STARTTLS_SLEEP one_line; ret=$?; (exit $ret); do
|
||||||
debugme echo "S: ${one_line}"
|
debugme echo "S: ${one_line}"
|
||||||
if [[ $# -ge 3 ]]; then
|
if [[ $# -ge 3 ]]; then
|
||||||
if [[ ${one_line} =~ $3 ]]; then
|
if [[ ${one_line} =~ $3 ]]; then
|
||||||
@ -6868,7 +6868,6 @@ starttls_full_read(){
|
|||||||
return 2
|
return 2
|
||||||
fi
|
fi
|
||||||
done <&5
|
done <&5
|
||||||
ret=$?
|
|
||||||
debugme echo "=== full read error/timeout ==="
|
debugme echo "=== full read error/timeout ==="
|
||||||
IFS="${oldIFS}"
|
IFS="${oldIFS}"
|
||||||
return $ret
|
return $ret
|
||||||
|
Loading…
Reference in New Issue
Block a user