Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix ArrayBuffer detached error with uWebSockets.js
  • Loading branch information
ruochenjia committed Apr 20, 2025
commit 4af95592f54c4405d7335d5be96199cb584d330f
2 changes: 1 addition & 1 deletion packages/engine.io/lib/userver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class uServer extends BaseServer {
},
message: (ws, message, isBinary) => {
ws.getUserData().transport.onData(
isBinary ? message : Buffer.from(message).toString(),
isBinary ? message.slice(0, message.byteLength) : Buffer.from(message).toString(),
);
},
close: (ws, code, message) => {
Expand Down
1 change: 1 addition & 0 deletions packages/engine.io/wrapper.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ export {
attach,
parser,
protocol,
uServer
} from "./build/engine.io.js";