فهرست منبع

Fix redirect triggering multiple callbacks

ithewei 2 سال پیش
والد
کامیت
2641e14db1
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      http/client/AsyncHttpClient.cpp

+ 2 - 0
http/client/AsyncHttpClient.cpp

@@ -87,6 +87,8 @@ int AsyncHttpClient::doTask(const HttpClientTaskPtr& task) {
                     req->headers["Host"] = req->host;
                     resp->Reset();
                     send(ctx->task);
+                    // NOTE: detatch from original channel->context
+                    ctx->task = NULL;
                 }
             } else {
                 ctx->successCallback();