Skip to content

Commit f314475

Browse files
authored
fix: correctly consume ws package
1 parent 91e1c8b commit f314475

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/engine.io-client/lib/transports/websocket.node.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { WebSocket } from "ws";
1+
import * as ws from "ws";
22
import type { Packet, RawData } from "engine.io-parser";
33
import { BaseWS } from "./websocket.js";
44

@@ -27,7 +27,7 @@ export class WS extends BaseWS {
2727
opts.headers.cookie.push(`${name}=${cookie.value}`);
2828
}
2929
}
30-
return new WebSocket(uri, protocols, opts);
30+
return new ws.WebSocket(uri, protocols, opts);
3131
}
3232

3333
doWrite(packet: Packet, data: RawData) {

0 commit comments

Comments
 (0)