diff options
| author | Lu Qiuwen <[email protected]> | 2018-10-26 20:30:06 +0800 |
|---|---|---|
| committer | Lu Qiuwen <[email protected]> | 2018-10-26 20:30:06 +0800 |
| commit | cf64f01f7f4d4e7dd3f308f8a67e338d57953303 (patch) | |
| tree | c7558f895ab489d1516afa0f7b831df5040c92cc /plugin/business/pangu-http/src/pangu_web_cache.cpp | |
| parent | d3d34355ef9f261f91c017bc8af24c7611272003 (diff) | |
修正suspend/resume语义实现的若干问题,增加自行构建request/response的header标志
Diffstat (limited to 'plugin/business/pangu-http/src/pangu_web_cache.cpp')
| -rw-r--r-- | plugin/business/pangu-http/src/pangu_web_cache.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugin/business/pangu-http/src/pangu_web_cache.cpp b/plugin/business/pangu-http/src/pangu_web_cache.cpp index a20b2d7..7354145 100644 --- a/plugin/business/pangu-http/src/pangu_web_cache.cpp +++ b/plugin/business/pangu-http/src/pangu_web_cache.cpp @@ -432,7 +432,7 @@ static void cache_query_meta_on_succ(future_result_t * result, void * user) struct cache_pending_context* ctx=(struct cache_pending_context*)promise_get_ctx(p); struct tango_cache_result* _result=tango_cache_read_result(result); ctx->ref_tango_cache_result=_result; - time_t cache_last_modified_time=0, request_last_modified_time=0; + switch(_result->type) { case RESULT_TYPE_HEADER: @@ -690,9 +690,14 @@ void web_cache_update(struct cache_update_context* ctx, const unsigned char * bo } void web_cache_update_end(struct cache_update_context* ctx) { + fprintf(stderr, "------- web_cache_update_end , %p\n", ctx); + tango_cache_update_end(ctx->write_ctx); + ATOMIC_DEC(&(ctx->ref_cache_handle->stat_val[STAT_CACHE_UPLOADING])); + + ctx->write_ctx = NULL; + ctx->ref_cache_handle = NULL; free(ctx); - ATOMIC_DEC(&(ctx->ref_cache_handle->stat_val[STAT_CACHE_UPLOADING])); return; } |
