流式上传主动cancel时会产生promise_fail回调

This commit is contained in:
zhangchengwei
2018-11-25 13:49:39 +08:00
parent bc1907d2c4
commit cb3737d02a
3 changed files with 7 additions and 10 deletions

View File

@@ -260,6 +260,7 @@ void tango_cache_update_end(struct tango_cache_ctx *ctx)
void tango_cache_update_cancel(struct tango_cache_ctx *ctx)
{
ctx->put.close_state = true;
if(ctx->curl != NULL)
{
curl_multi_remove_handle(ctx->instance->multi_hd, ctx->curl);
@@ -270,11 +271,11 @@ void tango_cache_update_cancel(struct tango_cache_ctx *ctx)
//<2F>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD><D6B6>ϴ<EFBFBD>IDʱ<44><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>cancelɾ<6C><C9BE>
if(ctx->put.uploadID!=NULL && cache_cancel_upload_minio(ctx))
{
ctx->put.state = PUT_STATE_USER_CANCEL;
ctx->put.state = PUT_STATE_CANCEL;
}
else
{
tango_cache_ctx_destroy(ctx, false);
tango_cache_ctx_destroy(ctx);
}
}