Skip to content

Commit 697acc0

Browse files
authored
bugfix: default to port 443 for wss urls (#55)
fixes issue #21
1 parent 34f6b41 commit 697acc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/resty/websocket/client.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function _M.connect(self, uri, opts)
9191
-- ngx.say("port: ", port)
9292

9393
if not port then
94-
port = 80
94+
port = scheme == 'wss' and 443 or 80
9595
end
9696

9797
if path == "" then

0 commit comments

Comments
 (0)