Skip to content

Commit baa159f

Browse files
committed
correct way to specify random listen port
1 parent d2c242f commit baa159f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

t/170-proxy-ssl-cert.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ proxy_ssl_certificate_by_lua: cert cb aborted
11751175
=== TEST 23: cosocket
11761176
--- http_config
11771177
server {
1178-
listen *:80;
1178+
listen 127.0.0.1:$TEST_NGINX_RAND_PORT_1;
11791179
server_name test.com;
11801180
11811181
server_tokens off;
@@ -1226,7 +1226,7 @@ proxy_ssl_certificate_by_lua: cert cb aborted
12261226
local sock = ngx.socket.tcp()
12271227
sock:settimeout(2000)
12281228
1229-
local ok, err = sock:connect("127.0.0.1", "80")
1229+
local ok, err = sock:connect("127.0.0.1", $TEST_NGINX_RAND_PORT_1)
12301230
if not ok then
12311231
ngx.log(ngx.ERR, "failed to connect: ", err)
12321232
return

0 commit comments

Comments
 (0)