From 276a66af8a1b152a15f85ba42c43778be7d14b8e Mon Sep 17 00:00:00 2001 From: zhengchao Date: Fri, 23 Nov 2018 21:13:28 +0800 Subject: [PATCH] =?UTF-8?q?cache=20query=20=E4=B9=9F=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E8=B0=83=E7=94=A8promise=5Fallow=5Fmany=5Fsuccesses?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/business/pangu-http/src/pangu_web_cache.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/business/pangu-http/src/pangu_web_cache.cpp b/plugin/business/pangu-http/src/pangu_web_cache.cpp index 50e720b..8f89d93 100644 --- a/plugin/business/pangu-http/src/pangu_web_cache.cpp +++ b/plugin/business/pangu-http/src/pangu_web_cache.cpp @@ -1143,7 +1143,8 @@ int web_cache_async_query(struct cache_handle* handle, unsigned int thread_id, query_ctx->ref_handle=handle; query_ctx->url=tfe_strdup(request->req_spec.url); - p=future_to_promise(f); + p=future_to_promise(f); + promise_allow_many_successes(p); promise_set_ctx(p, query_ctx, cache_query_ctx_free_cb); ATOMIC_INC(&(handle->stat_val[STAT_CACHE_QUERYING]));