summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-01-05 11:47:22 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-01-05 11:47:22 +0100
commit0df6614f632ecebf7badb9c84a012c698a42e512 (patch)
treebae033962c92122f14d1345c4cf4c9f64de1f437
parenteacfe3699147afd4088fb76b78b173fe1f0c523e (diff)
downloadcurl-bagder/hyper-endtask.tar.gz
c-hyper: poll the tasks until end correctlybagder/hyper-endtask
... makes test 36 work.
-rw-r--r--lib/c-hyper.c4
-rw-r--r--lib/c-hyper.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/c-hyper.c b/lib/c-hyper.c
index 9ee17e3f8..19ba8d9b8 100644
--- a/lib/c-hyper.c
+++ b/lib/c-hyper.c
@@ -329,7 +329,7 @@ CURLcode Curl_hyper_stream(struct Curl_easy *data,
hyper_error_free(hypererr);
break;
}
- else if(h->init) {
+ else if(h->endtask == task) {
/* end of transfer */
*done = TRUE;
infof(data, "hyperstream is done!\n");
@@ -341,7 +341,6 @@ CURLcode Curl_hyper_stream(struct Curl_easy *data,
}
/* HYPER_TASK_RESPONSE */
- h->init = TRUE;
*didwhat = KEEP_RECV;
if(!resp) {
failf(data, "hyperstream: couldn't get response");
@@ -403,6 +402,7 @@ CURLcode Curl_hyper_stream(struct Curl_easy *data,
result = CURLE_OUT_OF_MEMORY;
break;
}
+ h->endtask = foreach;
hyper_response_free(resp);
resp = NULL;
diff --git a/lib/c-hyper.h b/lib/c-hyper.h
index e2ff743b2..d60ed78d1 100644
--- a/lib/c-hyper.h
+++ b/lib/c-hyper.h
@@ -32,7 +32,7 @@ struct hyptransfer {
hyper_waker *write_waker;
hyper_waker *read_waker;
const hyper_executor *exec;
- bool init;
+ hyper_task *endtask;
};
size_t Curl_hyper_recv(void *userp, hyper_context *ctx,