Browse Source

http2: don't close connection when single transfer is stopped

Fixes #2237
Closes #2249
Kartik Mahajan 6 years ago
parent
commit
a5e6d6ebcb
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lib/multi.c

+ 2 - 1
lib/multi.c

@@ -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