Open brunohstein opened 6 months ago
Probably related: https://github.com/unjs/nitro/issues/1515.
Should this issue be handled in unjs/nitro or even nuxt/nuxt?
I just ran in to the same isse. I can close the connection on the fronend by calling close() on the eventsource, but the server end never closes connection, so I can't clean up my event listeners properly. Trying to find a work around.
Environment
Reproduction
I expected the server to log the message on
eventStream.onClosed
callback but that didn't happen.I also expected it to log on
node.req
"close" event as well, so I'm confused if I'm getting something really wrong. (About this I found this post that reports a similar problem)https://stackblitz.com/edit/nuxt-starter-aa9nxb?file=pages%2Findex.vue
Describe the bug
Hi! I'm experimenting with the new SSE support and having some trouble to close listeners and connections when the SSE request connection is closed. If I'm not missing something, it looks like
onClosed
should be fired but it's not.Additional context
No response
Logs
No response