diff options
author | Daniel Stenberg <daniel@haxx.se> | 2016-08-11 14:00:23 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-08-28 16:44:49 +0200 |
commit | 3533def3d556e09f178e52e37b89fe8015b907f9 (patch) | |
tree | b0739d3a99475488a66e92ca29ed02521ae8a32f /lib/url.c | |
parent | a6ddd6555e02bb3114e3d193f7474c402269a040 (diff) |
http2: make sure stream errors don't needlessly close the connection
With HTTP/2 each transfer is made in an indivial logical stream over the
connection, making most previous errors that caused the connection to get
forced-closed now instead just kill the stream and not the connection.
Fixes #941
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -2830,6 +2830,17 @@ CURLcode Curl_disconnect(struct connectdata *conn, bool dead_connection) return CURLE_OK; } + /* + * If this connection isn't marked to force-close, leave it open if there + * are other users of it + */ + if(!conn->bits.close && + (conn->send_pipe->size + conn->recv_pipe->size)) { + DEBUGF(infof(data, "Curl_disconnect, usecounter: %d\n", + conn->send_pipe->size + conn->recv_pipe->size)); + return CURLE_OK; + } + if(conn->dns_entry != NULL) { Curl_resolv_unlock(data, conn->dns_entry); conn->dns_entry = NULL; |