open socket error message, not stdout

This commit is contained in:
Dirk
2025-07-18 19:06:42 +02:00
parent 9743a96462
commit 9e29b35e9e

View File

@ -1939,7 +1939,7 @@ http_head_printf() {
IFS=/ read -r proto foo node query <<< "$1" IFS=/ read -r proto foo node query <<< "$1"
node=${node%:*} node=${node%:*}
# $node works here good as it connects via IPv6 first, then IPv4 # $node works here good as it connects via IPv6 first, then IPv4
bash -c "exec 33<>/dev/tcp/$node/80" >/dev/null & bash -c "exec 33<>/dev/tcp/$node/80" 2>/dev/null &
wait_kill $! $HEADER_MAXSLEEP wait_kill $! $HEADER_MAXSLEEP
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
# not killed --> socket open. Now we connect to the virtual host "$node" # not killed --> socket open. Now we connect to the virtual host "$node"