-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
http: ClientRequest.abort is destroy #28683
Conversation
7962df1
to
cdd194e
Compare
673aa19
to
6bd3be5
Compare
a450164
to
54c460a
Compare
9f97795
to
d0101f8
Compare
There is more work to be done (e.g. the TODO in this PR) in terms of making ClientRequest and OutgoingMessage more stream like. But I suggest that be done in future PR's. |
d0101f8
to
ab00509
Compare
Fixed failing test |
ping @benjamingr |
9f8fb09
to
3bbfbde
Compare
c9baec5
to
3211fe8
Compare
3211fe8
to
6f95d70
Compare
@Trott: This is no longer blocked |
@Trott: this looks ready |
@lpinca you good with this? |
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.
RSLGTM
I think this requires a CITGM run. The breaking changes are big enough. |
lol, what? :D |
Rubber Stamp LGTM :) |
@Trott CITGM please |
Type: Documentation-only | ||
|
||
[`ClientRequest.destroy()`][] should be the same as | ||
[`ClientRequest.abort()`][]. Make ClientRequest more streamlike by deprecating |
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.
Optional suggestion:
[`ClientRequest.abort()`][]. Make ClientRequest more streamlike by deprecating | |
[`ClientRequest.abort()`][]. Make ClientRequest more stream-like by deprecating |
CITGM looks good but this does need a rebase. |
I think #29192 is a much more elegant solution, although a bit more risky... |
Closing in favor of #29192 which should not be as controversial. Will open a new PR if required once there is consensus. |
ClientRequest.destroy()
should be the same asabort()
. MakeClientRequest
more streamlike by deprecatingabort()
.If request has completed it cannot be aborted.
This also allows us to replace a lot of edge case code (e.g.
isRequest
) that has to callabort
forClientRequest
while everything else is justdestroy
.Calling
destroy
previously instead ofabort
might have some weird behaviour sinceabort
seems to take a lot more stuff into account e.g.req.agent
.Refs: #28686
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesNOTE TO SELF: look into the callback