Commit cb04619d authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Make the do_complete() function not get called until the DO actually is

compelete, which bascially means when used with the multi interface
parent 61e2e86a
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -4575,8 +4575,8 @@ CURLcode Curl_do(struct connectdata **connp, bool *done)
      }
    }

    if(result == CURLE_OK)
      /* pre readwrite must be called after the protocol-specific DO function */
    if((result == CURLE_OK) && *done)
      /* do_complete must be called after the protocol-specific DO function */
      do_complete(conn);
  }
  return result;
@@ -4589,6 +4589,10 @@ CURLcode Curl_do_more(struct connectdata *conn)
  if(conn->handler->do_more)
    result = conn->handler->do_more(conn);

  if(result == CURLE_OK)
    /* do_complete must be called after the protocol-specific DO function */
    do_complete(conn);

  return result;
}