crossws
crossws copied to clipboard
peer.close() does not pass code and reason to hooks
Environment
Bun 1.1.29 Crossws 0.3.1
Reproduction
- Create a bun crossws instance
- Define a close hook
- Run
peer.close(4001, "some reason");
Describe the bug
using peer.close(4001, "some-reason")
does not pass the code
and reason
to the close hook.
It seems that an empty {}
object is being passed to it.
https://github.com/unjs/crossws/blob/05ded7bd961d26d310786f529c0deb8cf9dcf02c/src/adapters/bun.ts#L62
Additional context
No response
Logs
No response