]> granicus.if.org Git - curl/commitdiff
http2: don't close connection when single transfer is stopped
authorKartik Mahajan <kartik.mahajan@pubmatic.com>
Thu, 18 Jan 2018 16:58:59 +0000 (22:28 +0530)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 18 Jan 2018 21:28:12 +0000 (22:28 +0100)
Fixes #2237
Closes #2249

lib/multi.c

index e35b8fa196dfaf97d80a750576c9d3509b523372..43823cc9311b1b1bb09df9e002145bfa1a60215b 100644 (file)
@@ -581,7 +581,8 @@ static CURLcode multi_done(struct connectdata **connp,
       && !(conn->ntlm.state == NTLMSTATE_TYPE2 ||
            conn->proxyntlm.state == NTLMSTATE_TYPE2)
 #endif
-     ) || conn->bits.close || premature) {
+     ) || conn->bits.close
+       || (premature && !(conn->handler->flags & PROTOPT_STREAM))) {
     CURLcode res2 = Curl_disconnect(conn, premature); /* close connection */
 
     /* If we had an error already, make sure we return that one. But