Skip to content

Commit

Permalink
fix(bun): pass code and reason to close hook (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 authored Feb 10, 2025
1 parent e5daf22 commit 52f5538
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/adapters/bun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ const bunAdapter: Adapter<BunAdapter, BunOptions> = (options = {}) => {
peers.add(peer);
hooks.callHook("open", peer);
},
close: (ws) => {
close: (ws, code, reason) => {
const peer = getPeer(ws, peers);
peers.delete(peer);
hooks.callHook("close", peer, {});
hooks.callHook("close", peer, { code, reason });
},
},
};
Expand Down

0 comments on commit 52f5538

Please sign in to comment.