Hey guys, I am working on a framework, mostly for my own stuff, and I am seeing an issue where the close event for websockets isn't being triggered, it will trigger if I manually call close against the client, but the server is not triggering close events.
The code in question:
https://github.com/sodacore/core/blob/main/packages/http/src/service/http.ts#L171
I have amended the code locally and added a console.log in there, but no matter what I do, I can't get it to trigger a close event (other than when you call close on the client manually), i.e. if I refresh the page, the connection technically has gone, but the close event is never fired.
I have tested this in a plain app using some sample code and it seems to work, so unsure if I am doing something different here?
Thanks in advance.
You can test it by:
- Calling
git clone <url> <folder> - Then running
bun install; bun script foreach bun installinside of the folder. - Then build it all:
bun script foreach bun run build - Then call
bun dev - Open http://localhost:3101/testing