Skip to content

Commit ed666e9

Browse files
author
melike2d
committed
🐛 fix default ports
1 parent 51955ed commit ed666e9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

mod.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ export async function connectPogSocket(uri: string, options: PogSocketOptions =
2121
switch (url.protocol) {
2222
case "http:":
2323
case "ws:":
24-
conn = await Deno.connect({ hostname: url.hostname, port: +(url.port ?? 80) });
24+
conn = await Deno.connect({ hostname: url.hostname, port: +(url.port || 80) });
2525
break;
2626
case "https:":
2727
case "wss:":
28-
conn = await Deno.connectTls({ hostname: url.hostname, port: +(url.port ?? 443) })
28+
conn = await Deno.connectTls({ hostname: url.hostname, port: +(url.port || 443) })
2929
break;
3030
default:
3131
throw new TypeError(`Unsupported protocol: ${url.protocol}`);

0 commit comments

Comments
 (0)