Fix run_server_preference() with no default protocol

run_server_preference() calls "default_proto=$(get_protocol $TMPFILE)" even if all attempts to connect to the server failed. This will result in default_proto incorrectly being set to TLS 1.2. This commit fixes the issue by only calling get_protocol() if an attempt to connect to the server was successful.
This commit is contained in:
David Cooper 2022-04-14 10:50:13 -04:00
parent 54e5469411
commit a2252168f1

View File

@ -6671,7 +6671,7 @@ run_server_preference() {
fi
fi
fi
default_proto=$(get_protocol $TMPFILE)
[[ $ret -eq 0 ]] && default_proto=$(get_protocol $TMPFILE)
[[ "$default_proto" == TLSv1.0 ]] && default_proto="TLSv1"
# debugme tm_out " --> $default_proto\n"