Skip to content

fix: response.write() to return a bool (resolves #683) #702

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

Open
wants to merge 1 commit into
base: mainline
Choose a base branch
from

Conversation

jimdigriz
Copy link

@jimdigriz jimdigriz commented Aug 4, 2025

Returning 'false'y tells the sender they need to wait for the 'drain' event which can cause middleware to hang (eg. SvelteKit adapter-node and trpc)

Original fix from @KATT in KATT@9ba260e

Issue #683:

Make response.write() return a bool (always 'true') to prevent middleware stalling waiting for a non-existent drain event.

Description of changes:

...added return true. :)

Checklist

  • Tests have been added and are passing
  • Documentation has been updated

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Returning 'false'y tells the sender they need to wait for the 'drain' event
which can cause middleware to hang (eg. SvelteKit adapter-node and trpc)

Original fix from @KATT in KATT@9ba260e
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

Successfully merging this pull request may close these issues.

1 participant