commit | e214f43c85d6ef90062e280c47591a44596d1c5f | [log] [tgz] |
---|---|---|
author | Sergey Kandaurov <pluknet@nginx.com> | Wed Apr 24 14:52:53 2019 +0300 |
committer | Sergey Kandaurov <pluknet@nginx.com> | Wed Apr 24 14:52:53 2019 +0300 |
tree | ceaa5e0da3f6cc2c97302219f78b52dc83f8767e | |
parent | eb7d45eec3d4a10502e5326bcddb1d703e970101 [diff] |
Tests: avoid uninitialized warnings in stream_upstream_random.t.
diff --git a/stream_upstream_random.t b/stream_upstream_random.t index c895ef1..84bab54 100644 --- a/stream_upstream_random.t +++ b/stream_upstream_random.t
@@ -243,7 +243,8 @@ my @s = map { get($port, $uri, start => 1, sleep => 0.1) } (1 .. $n); for (@s) { - if (http_end($_) =~ /X-Port: (\d+)/) { + my $r = http_end($_); + if ($r && $r =~ /X-Port: (\d+)/) { $ports{$1} = 0 unless defined $ports{$1}; $ports{$1}++; }