Skip to content

Commit 79cc06d

Browse files
authored
Move the connection back to the connection pool when HTTP error 404 was received (#5308)
* Move the connection back to the connection pool when HTTP error 404 was received * Use symbolic name for 404 status code
1 parent 807b6c9 commit 79cc06d

File tree

1 file changed

+1
-2
lines changed
  • sdk/core/azure-core/src/http/curl

1 file changed

+1
-2
lines changed

sdk/core/azure-core/src/http/curl/curl.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2132,8 +2132,7 @@ void CurlConnectionPool::MoveConnectionBackToPool(
21322132
HttpStatusCode lastStatusCode)
21332133
{
21342134
auto code = static_cast<std::underlying_type<Http::HttpStatusCode>::type>(lastStatusCode);
2135-
// laststatusCode = 0
2136-
if (code < 200 || code >= 300)
2135+
if ((code < 200 || code >= 300) && lastStatusCode != HttpStatusCode::NotFound)
21372136
{
21382137
// A handler with previous response with Error can't be re-use.
21392138
return;

0 commit comments

Comments
 (0)