diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2014-11-18 20:51:54 +0100 | 
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2014-11-18 22:57:22 +0100 | 
| commit | b77ff4d589785861b0a91bef6b6fc2a261374f1c (patch) | |
| tree | 55796d59ad8e90104f34bda0452e332b34296404 | |
| parent | 36f7b399de166defdcba237bef31f9f3998a529b (diff) | |
multi: move the ending condition into the loop as well
... as it was before I changed the loop in commit e04ccbd50. It caused
test 2030 and 2032 to fail.
| -rw-r--r-- | lib/multi.c | 25 | 
1 files changed, 13 insertions, 12 deletions
diff --git a/lib/multi.c b/lib/multi.c index 7e1adf765..080e54bce 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -956,7 +956,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,        data->state.pipe_broke = FALSE;        data->easy_conn = NULL; -      break; +      continue;      }      if(!data->easy_conn && @@ -1750,22 +1750,23 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,          rc = CURLM_CALL_MULTI_PERFORM;        }      } -  } while(rc == CURLM_CALL_MULTI_PERFORM); -  data->result = result; +    if(CURLM_STATE_COMPLETED == data->mstate) { +      /* now fill in the Curl_message with this info */ +      msg = &data->msg; + +      msg->extmsg.msg = CURLMSG_DONE; +      msg->extmsg.easy_handle = data; +      msg->extmsg.data.result = result; -  if(CURLM_STATE_COMPLETED == data->mstate) { -    /* now fill in the Curl_message with this info */ -    msg = &data->msg; +      rc = multi_addmsg(multi, msg); -    msg->extmsg.msg = CURLMSG_DONE; -    msg->extmsg.easy_handle = data; -    msg->extmsg.data.result = result; +      multistate(data, CURLM_STATE_MSGSENT); +    } +  } while(rc == CURLM_CALL_MULTI_PERFORM); -    rc = multi_addmsg(multi, msg); +  data->result = result; -    multistate(data, CURLM_STATE_MSGSENT); -  }    return rc;  }  | 
