Revert "Move the connection back to the connection pool when HTTP error 404 was received (#5308)" (#5472)

* Revert "Move the connection back to the connection pool when HTTP error 404 was received (#5308)"

This reverts commit 79cc06d004.

* Changelog

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
This commit is contained in:
Anton Kolesnyk 2024-04-02 17:08:34 -07:00 коммит произвёл GitHub
Родитель 6a711f5ca4
Коммит d62b0d6669
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -8,6 +8,7 @@
### Bugs Fixed ### Bugs Fixed
- [[#5450]](https://github.com/Azure/azure-sdk-for-cpp/issues/5450) Reverted libcurl connection pool to use more conservative caching strategy.
- [[#4352]](https://github.com/Azure/azure-sdk-for-cpp/pull/5371) Fixed compilation error on Visual Studio 2017. (A community contribution, courtesy of _[morten-ofstad](https://github.com/morten-ofstad)_) - [[#4352]](https://github.com/Azure/azure-sdk-for-cpp/pull/5371) Fixed compilation error on Visual Studio 2017. (A community contribution, courtesy of _[morten-ofstad](https://github.com/morten-ofstad)_)
### Acknowledgments ### Acknowledgments

Просмотреть файл

@ -2132,7 +2132,8 @@ void CurlConnectionPool::MoveConnectionBackToPool(
HttpStatusCode lastStatusCode) HttpStatusCode lastStatusCode)
{ {
auto code = static_cast<std::underlying_type<Http::HttpStatusCode>::type>(lastStatusCode); auto code = static_cast<std::underlying_type<Http::HttpStatusCode>::type>(lastStatusCode);
if ((code < 200 || code >= 300) && lastStatusCode != HttpStatusCode::NotFound) // laststatusCode = 0
if (code < 200 || code >= 300)
{ {
// A handler with previous response with Error can't be re-use. // A handler with previous response with Error can't be re-use.
return; return;