Explorar o código

Fix redirect triggering multiple callbacks

ithewei %!s(int64=2) %!d(string=hai) anos
pai
achega
2641e14db1
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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();