-
Notifications
You must be signed in to change notification settings - Fork 669
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
bug: write method is not returning a boolean value #683
Comments
1 task
This might be enough? KATT@9ba260e |
1 task
alan-agius4
added a commit
to alan-agius4/angular-cli
that referenced
this issue
Mar 11, 2025
… a boolean Implements a workaround for CodeGenieApp/serverless-express#683 Closes angular#29801
alan-agius4
added a commit
to angular/angular-cli
that referenced
this issue
Mar 11, 2025
… a boolean Implements a workaround for CodeGenieApp/serverless-express#683 Closes #29801
alan-agius4
added a commit
to angular/angular-cli
that referenced
this issue
Mar 11, 2025
… a boolean Implements a workaround for CodeGenieApp/serverless-express#683 Closes #29801 (cherry picked from commit ee8466d)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The implementation of the write method is missing a boolean return value indicating the need of
drain
https://github.com/CodeGenieApp/serverless-express/blob/mainline/src/response.js.See https://nodejs.org/api/stream.html#writablewritechunk-encoding-callback
'The return value is true if the internal buffer is less than the highWaterMark configured when the stream was created after admitting chunk. If false is returned, further attempts to write data to the stream should stop until the 'drain' event is emitted.'
With newer versions of trpc (11.0.0-rc.419) this leads to a hang. The trpc middleware interprets void as false and waits for the 'drain' event that is never showing up. The lambda runtime is shutting down the event handling with an internal server error.
See https://github.com/trpc/trpc/blob/fbb4a2fb4b71d2f5ab7ee97617d951f3a92517c8/packages/server/src/adapters/node-http/nodeHTTPRequestHandler.ts#L85
In response.js the write method should return true.
See https://github.com/realityfilter/serverless-express-write-bugreport
for a test case.
The text was updated successfully, but these errors were encountered: