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

Await middleware responses #1744

Closed
katywings opened this issue Jan 29, 2025 · 0 comments · Fixed by #1588
Closed

Await middleware responses #1744

katywings opened this issue Jan 29, 2025 · 0 comments · Fixed by #1588
Assignees
Labels
bug Something isn't working

Comments

@katywings
Copy link
Contributor

Currently if a start middleware returns a result, the internal sendWebResponse is not being called with await. This becomes a problem if the result type is of asynchronous nature (e.g. a stream) as h3 will not wait for it to finish and proceed with the next entry in the chain.

Awaiting sendWebResponse solves some cases, but not all of them (#1588 (comment)). A discussion about rewriting the start middleware from the current h3 hooks approach to proper h3 middleware is recommended. Follow ups: #1743 and #1523.

@katywings katywings added the bug Something isn't working label Jan 29, 2025
@katywings katywings self-assigned this Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant