Skip to content

Commit 46dc9e3

Browse files
committed
correct way to specify random listen port
1 parent e172890 commit 46dc9e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/165-proxy-ssl-cert-by.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ proxy_ssl_certificate_by_lua: cert cb aborted
863863
=== TEST 21: cosocket
864864
--- stream_config
865865
server {
866-
listen *:80;
866+
listen 127.0.0.1:$TEST_NGINX_RAND_PORT_1;
867867
868868
return "it works!\n";
869869
}
@@ -893,7 +893,7 @@ proxy_ssl_certificate_by_lua: cert cb aborted
893893
local sock = ngx.socket.tcp()
894894
sock:settimeout(2000)
895895
896-
local ok, err = sock:connect("127.0.0.1", "80")
896+
local ok, err = sock:connect("127.0.0.1", $TEST_NGINX_RAND_PORT_1)
897897
if not ok then
898898
ngx.log(ngx.ERR, "failed to connect: ", err)
899899
return

0 commit comments

Comments
 (0)