Skip to content

Commit 3df3fed

Browse files
fix(eio-client): restore default transport resolution
Keep transport names as the ordered list used for connection attempts, while storing transport constructors in a separate lookup map. This restores default transport resolution, keeps constructor-based transports for backward compatibility, and avoids mutating user-provided transport arrays during fallback/reconnect attempts. New syntax: ```js import { Socket, XHR, WebSocket } from "engine.io-client"; const socket = new Socket({ transportImplementations: [XHR, WebSocket] }); ``` Related: - #5197 - #5327 - #5330 See also: socketio/engine.io-client@f4d898e
1 parent aaf2af3 commit 3df3fed

2 files changed

Lines changed: 196 additions & 247 deletions

File tree

‎packages/engine.io-client/lib/index.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ export {
55
HandshakeData,
66
SocketOptions,
77
SocketReservedEvents,
8-
SocketWithoutUpgrade,
9-
SocketWithUpgrade,
108
WriteOptions,
9+
TransportCtor,
10+
TransportName,
1111
} from "./socket.js";
1212
export const protocol = Socket.protocol;
1313
export {

0 commit comments

Comments
 (0)