Skip to content

Commit 360a1fb

Browse files
committed
hack/test-port-forwarding.pl: Use -G to connection timeout on nc
Signed-off-by: Norio Nomura <[email protected]>
1 parent 6eb6232 commit 360a1fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hack/test-port-forwarding.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@
201201
next if $test->{host_port} == $sshLocalPort;
202202
my $cmd;
203203
if ($writer eq "nc") {
204-
$cmd = $test->{host_socket} eq "" ? "nc -w $connectionTimeout $test->{host_ip} $test->{host_port}" : "nc -w $connectionTimeout -U $test->{host_socket}";
204+
$cmd = $test->{host_socket} eq "" ? "nc -w 1 -G $connectionTimeout $test->{host_ip} $test->{host_port}" : "nc -w 1 -G $connectionTimeout -U $test->{host_socket}";
205205
} elsif ($writer eq "socat") {
206206
my $tcp_dest = $test->{host_ip} =~ /:/ ? "TCP6:[$test->{host_ip}]:$test->{host_port}" : "TCP:$test->{host_ip}:$test->{host_port}";
207207
$cmd = $test->{host_socket} eq "" ? "socat -u STDIN $tcp_dest,connect-timeout=$connectionTimeout" : "socat -u STDIN UNIX-CONNECT:$test->{host_socket}";

0 commit comments

Comments
 (0)