From 92c2a4c053f75bbfe8434379dbdd6acd714a2252 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 17 Feb 2016 21:36:59 +0900 Subject: http2: Add handling stream level error Previously, when a stream was closed with other than NGHTTP2_NO_ERROR by RST_STREAM, underlying TCP connection was dropped. This is undesirable since there may be other streams multiplexed and they are very much fine. This change introduce new error code CURLE_HTTP2_STREAM, which indicates stream error that only affects the relevant stream, and connection should be kept open. The existing CURLE_HTTP2 means connection error in general. Ref: https://github.com/curl/curl/issues/659 Ref: https://github.com/curl/curl/pull/663 --- lib/multi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/multi.c') diff --git a/lib/multi.c b/lib/multi.c index 8c69e37a5..b1c1f5396 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -1880,7 +1880,8 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, * happened in the data connection. */ - if(!(data->easy_conn->handler->flags & PROTOPT_DUAL)) + if(!(data->easy_conn->handler->flags & PROTOPT_DUAL) && + result != CURLE_HTTP2_STREAM) connclose(data->easy_conn, "Transfer returned error"); Curl_posttransfer(data); -- cgit v1.2.3