Skip to content

Commit 36ee259

Browse files
committed
cleanup
1 parent 23ac517 commit 36ee259

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/ws-proxy.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ module.exports = (config) => {
1919

2020
if (route) {
2121
const subProtocols = route.subProtocols || []
22-
const client = new WebSocket(req, socket, body, subProtocols)
2322
route.hooks = route.hooks || {}
2423
const onOpen = route.hooks.onOpen || onOpenNoOp
2524

25+
const client = new WebSocket(req, socket, body, subProtocols)
26+
2627
try {
2728
await onOpen(client, url.searchParams)
2829

0 commit comments

Comments
 (0)