Temporary fix dead HttpClient. (#1542)

This commit is contained in:
Nitromelon 2023-03-21 14:51:37 +08:00 committed by GitHub
parent ceab5f3037
commit 4f066258f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -89,6 +89,9 @@ void HttpClientImpl::createTcpClient()
} }
auto resp = responseParser->responseImpl(); auto resp = responseParser->responseImpl();
responseParser->reset(); responseParser->reset();
// temporary fix of dead tcpClientPtr_
// TODO: fix HttpResponseParser when content-length absence
thisPtr->tcpClientPtr_.reset();
thisPtr->handleResponse(resp, std::move(firstReq), connPtr); thisPtr->handleResponse(resp, std::move(firstReq), connPtr);
if (!thisPtr->requestsBuffer_.empty()) if (!thisPtr->requestsBuffer_.empty())
{ {