correctly capture return code in starttls_full_read

This commit is contained in:
typingArtist 2017-04-30 19:57:40 +02:00
parent ba9c056dfc
commit 55bbeef36c

View File

@ -6843,7 +6843,7 @@ starttls_full_read(){
local oldIFS="$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}"
if [[ $# -ge 3 ]]; then
if [[ ${one_line} =~ $3 ]]; then
@ -6863,7 +6863,6 @@ starttls_full_read(){
return 2
fi
done <&5
ret=$?
debugme echo "=== full read error/timeout ==="
IFS="${oldIFS}"
return $ret