-
Notifications
You must be signed in to change notification settings - Fork 30
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
Drain the response stream in the command method #264
Conversation
if (!params.body) return request.end() | ||
}) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The buildDefaultHeaders
/createClientRequest
/request
methods were moved to the bottom cause it was too annoying to have it at the very top (no other changes).
} finally { | ||
controllerCleanup() | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one was used for both exec + command client methods. Now, the connection has them separate, but the logic is still (mostly) shared.
@@ -18,5 +18,4 @@ export const WebImpl: ImplementationDetails<ReadableStream>['impl'] = { | |||
query_id: string, | |||
) => new ResultSet(stream, format, query_id)) as any, | |||
values_encoder: new WebValuesEncoder(), | |||
close_stream: (stream) => stream.cancel(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally, we don't need this anymore.
Quality Gate passedIssues Measures |
Summary
The
command
method now drains the response stream properly, as the previous implementation could cause the Keep-Alive socket to close after each request.Checklist