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
This commit is contained in:
parent
807b6c946a
commit
79cc06d004
@ -2132,8 +2132,7 @@ void CurlConnectionPool::MoveConnectionBackToPool(
|
||||
HttpStatusCode lastStatusCode)
|
||||
{
|
||||
auto code = static_cast<std::underlying_type<Http::HttpStatusCode>::type>(lastStatusCode);
|
||||
// laststatusCode = 0
|
||||
if (code < 200 || code >= 300)
|
||||
if ((code < 200 || code >= 300) && lastStatusCode != HttpStatusCode::NotFound)
|
||||
{
|
||||
// A handler with previous response with Error can't be re-use.
|
||||
return;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user