Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event stream "onClosed" callback not firing on Nuxt #717

Open
brunohstein opened this issue Mar 21, 2024 · 1 comment
Open

Event stream "onClosed" callback not firing on Nuxt #717

brunohstein opened this issue Mar 21, 2024 · 1 comment

Comments

@brunohstein
Copy link

Environment

  • h3 nightly
  • Nuxt 3.11.1
  • Node 18.18.0

Reproduction

I expected the server to log the message on eventStream.onClosed callback but that didn't happen.

Captura de Tela 2024-03-21 às 09 04 36

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

@brunohstein
Copy link
Author

Probably related: unjs/nitro#1515.

Should this issue be handled in unjs/nitro or even nuxt/nuxt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant