The client gives the server 1 second to respond, the server intentionally
chooses a random value between 0 to 2000 ms to wait before replying to the
client. So sometimes the request doesn't "complete" and so libcurl
"tearsdown" the connection when curl_multi_remove_handle is called(which
ideally it shouldn't for http2)
There are example code provided by the reporter to reproduce the issue in the email.
I expected the following
If the connection is setup, removing an individual HTTP/2 transfer should not close the connection.
Probably not relevant
The text was updated successfully, but these errors were encountered:
I am attaching a patch. Do you think that it makes sense? I am able to verify that it fixes the issues of connection "teardown", but want to be sure that it won't cause problems elsewhere(regression). I did some load testing for a couple of hours and didn't see any memory leaks. Basically the patch says that once we know that the protocol supports "logical streams", even if the transfer didn't reach DONE state, it is sufficient to close/reset the underlying stream(which happens in function Curl_http2_done by calling nghttp2_submit_rst_stream API) and therefore there is no need to "teardown" the underlying TCP connection.