mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
c-hyper: poll the tasks until end correctly
... makes test 36 work. Closes #6412
This commit is contained in:
parent
56b32b5d75
commit
25c1d5e6a8
@ -329,7 +329,7 @@ CURLcode Curl_hyper_stream(struct Curl_easy *data,
|
|||||||
hyper_error_free(hypererr);
|
hyper_error_free(hypererr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if(h->init) {
|
else if(h->endtask == task) {
|
||||||
/* end of transfer */
|
/* end of transfer */
|
||||||
*done = TRUE;
|
*done = TRUE;
|
||||||
infof(data, "hyperstream is done!\n");
|
infof(data, "hyperstream is done!\n");
|
||||||
@ -341,7 +341,6 @@ CURLcode Curl_hyper_stream(struct Curl_easy *data,
|
|||||||
}
|
}
|
||||||
/* HYPER_TASK_RESPONSE */
|
/* HYPER_TASK_RESPONSE */
|
||||||
|
|
||||||
h->init = TRUE;
|
|
||||||
*didwhat = KEEP_RECV;
|
*didwhat = KEEP_RECV;
|
||||||
if(!resp) {
|
if(!resp) {
|
||||||
failf(data, "hyperstream: couldn't get response");
|
failf(data, "hyperstream: couldn't get response");
|
||||||
@ -403,6 +402,7 @@ CURLcode Curl_hyper_stream(struct Curl_easy *data,
|
|||||||
result = CURLE_OUT_OF_MEMORY;
|
result = CURLE_OUT_OF_MEMORY;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
h->endtask = foreach;
|
||||||
|
|
||||||
hyper_response_free(resp);
|
hyper_response_free(resp);
|
||||||
resp = NULL;
|
resp = NULL;
|
||||||
|
@ -32,7 +32,7 @@ struct hyptransfer {
|
|||||||
hyper_waker *write_waker;
|
hyper_waker *write_waker;
|
||||||
hyper_waker *read_waker;
|
hyper_waker *read_waker;
|
||||||
const hyper_executor *exec;
|
const hyper_executor *exec;
|
||||||
bool init;
|
hyper_task *endtask;
|
||||||
};
|
};
|
||||||
|
|
||||||
size_t Curl_hyper_recv(void *userp, hyper_context *ctx,
|
size_t Curl_hyper_recv(void *userp, hyper_context *ctx,
|
||||||
|
Loading…
Reference in New Issue
Block a user