}
/* if there's still a connection to use, call the progress function */
else if(easy->easy_conn && Curl_pgrsUpdate(easy->easy_conn)) {
- easy->result = CURLE_ABORTED_BY_CALLBACK;
- multistate(easy, CURLM_STATE_COMPLETED);
+ /* aborted due to progress callback return code must close the
+ connection */
+ easy->easy_conn->bits.close = TRUE;
+
+ /* if not yet in DONE state, go there, otherwise COMPLETED */
+ multistate(easy, (easy->state < CURLM_STATE_DONE)?
+ CURLM_STATE_DONE: CURLM_STATE_COMPLETED);
+ result = CURLM_CALL_MULTI_PERFORM;
}
}
} WHILE_FALSE; /* just to break out from! */
static long ConnectionKillOne(struct SessionHandle *data);
static void conn_free(struct connectdata *conn);
static void signalPipeClose(struct curl_llist *pipeline, bool pipe_broke);
+static CURLcode do_init(struct connectdata *conn);
/*
* Protocol table.
ConnectionStore(data, conn);
}
+ /* Setup and init stuff before DO starts, in preparing for the transfer. */
+ do_init(conn);
+
/*
* Setup whatever necessary for a resumed transfer
*/
struct connectdata *conn = *connp;
struct SessionHandle *data = conn->data;
- /* setup and init stuff before DO starts, in preparing for the transfer */
- do_init(conn);
-
if(conn->handler->do_it) {
/* generic protocol-specific function pointer set in curl_connect() */
result = conn->handler->do_it(conn, done);