mirror of
https://github.com/curl/curl.git
synced 2026-08-26 05:43:31 +03:00
parent
c7f53b7493
commit
be8d2b037d
4 changed files with 23 additions and 7 deletions
|
|
@ -692,9 +692,18 @@ static int uploadstreamed(void *userdata, hyper_context *ctx,
|
||||||
data->state.hresult = result;
|
data->state.hresult = result;
|
||||||
return HYPER_POLL_ERROR;
|
return HYPER_POLL_ERROR;
|
||||||
}
|
}
|
||||||
if(!fillcount)
|
if(!fillcount) {
|
||||||
/* done! */
|
if((data->req.keepon & KEEP_SEND_PAUSE) != KEEP_SEND_PAUSE)
|
||||||
*chunk = NULL;
|
/* done! */
|
||||||
|
*chunk = NULL;
|
||||||
|
else {
|
||||||
|
/* paused, save a waker */
|
||||||
|
if(data->hyp.send_body_waker)
|
||||||
|
hyper_waker_free(data->hyp.send_body_waker);
|
||||||
|
data->hyp.send_body_waker = hyper_context_waker(ctx);
|
||||||
|
return HYPER_POLL_PENDING;
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
hyper_buf *copy = hyper_buf_copy((uint8_t *)data->state.ulbuf, fillcount);
|
hyper_buf *copy = hyper_buf_copy((uint8_t *)data->state.ulbuf, fillcount);
|
||||||
if(copy)
|
if(copy)
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ struct hyptransfer {
|
||||||
const hyper_executor *exec;
|
const hyper_executor *exec;
|
||||||
hyper_task *endtask;
|
hyper_task *endtask;
|
||||||
hyper_waker *exp100_waker;
|
hyper_waker *exp100_waker;
|
||||||
|
hyper_waker *send_body_waker;
|
||||||
};
|
};
|
||||||
|
|
||||||
size_t Curl_hyper_recv(void *userp, hyper_context *ctx,
|
size_t Curl_hyper_recv(void *userp, hyper_context *ctx,
|
||||||
|
|
|
||||||
10
lib/easy.c
10
lib/easy.c
|
|
@ -1132,6 +1132,16 @@ CURLcode curl_easy_pause(struct Curl_easy *data, int action)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef USE_HYPER
|
||||||
|
if(!(newstate & KEEP_SEND_PAUSE)) {
|
||||||
|
/* need to wake the send body waker */
|
||||||
|
if(data->hyp.send_body_waker) {
|
||||||
|
hyper_waker_wake(data->hyp.send_body_waker);
|
||||||
|
data->hyp.send_body_waker = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* if there's no error and we're not pausing both directions, we want
|
/* if there's no error and we're not pausing both directions, we want
|
||||||
to have this handle checked soon */
|
to have this handle checked soon */
|
||||||
if((newstate & (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) !=
|
if((newstate & (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) !=
|
||||||
|
|
|
||||||
|
|
@ -69,10 +69,6 @@
|
||||||
565
|
565
|
||||||
579
|
579
|
||||||
587
|
587
|
||||||
670
|
|
||||||
671
|
|
||||||
672
|
|
||||||
673
|
|
||||||
# 1021 re-added here due to flakiness
|
# 1021 re-added here due to flakiness
|
||||||
1021
|
1021
|
||||||
1117
|
1117
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue