You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
8.22.0 regression: CURLE_SEND_ERROR when reusing an HTTP/2 connection the server closed less than 1 s earlier #23621
After upgrading libcurl 8.21.0 to 8.22.0, transfers over HTTP/2 (multi interface, one connection per host, multiplexing) intermittently fail with CURLE_SEND_ERROR (55) and no response, e.g.:
Failed sending data to the peer (55): OpenSSL SSL_read: OpenSSL/3.6.3: error:0A000126:SSL routines::unexpected eof while reading, errno 0
Failed sending data to the peer (55): OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 0
Failed sending data to the peer (55): Send failure: Broken pipe
Likely cause:
#22169 ("connection alive checks intervals"): Curl_cpool_conn_seems_healthy() skips the liveness probe when the connection was checked less than 1000 ms ago:
and lastchecked is set in Curl_cpool_conn_now_idle(), when the connection's last transfer finishes. So a connection the server closed within that second is reused without a probe, and the new transfers fail. In 8.21.0 picking an idle connection always ran Curl_conn_seems_dead(), which discarded it.
Waiting 1.5 s before the next transfers makes 8.22.0 succeed, consistent with this.
I expected the following
as with 8.21.0, a transfer should never fail because the pooled connection it picked was already closed by the server. curl should detect the closed connection before reusing it, or retry the transfer on a fresh connection when it fails before any response data arrived.
Activity
bagder commentedon Oct 27, 2026
"Never" is hard to live up to.
icing commentedon Oct 28, 2026
@plv1313 please have a look at #23647 which always checks now when an idle connection is picked up.
As to "never": the server's GOAWAY or connection close might arrive a nanosecond after the check...