diff options
author | Abhilash Raju <abhilash.kollam@gmail.com> | 2024-06-01 10:01:01 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2024-06-07 18:12:17 +0300 |
commit | 2ecde74fa187366dc4ed628e61a88015cdbeb769 (patch) | |
tree | e1fedfa2290c6c017b3ea1179953a5a53ea10324 | |
parent | de9ad764973364a19f50bee6c3032fdacc1f51f1 (diff) | |
download | bmcweb-2ecde74fa187366dc4ed628e61a88015cdbeb769.tar.xz |
http_client: Fixing bug in retry after a close call
After a close call httpclient is not starting with fresh socket to
restart the connection. Send failure is observed in cases where new
connection is started from doResolve.Calling restartConnection instead
of doResolve did fix the issue.
Tested By:
Running developer test on use cases such as redfish aggregation where
number of retries are smaller.
Change-Id: I12f6a73fbafd14f482807f34ffa1e02fad944fc1
Signed-off-by: Abhilash Raju <abhilash.kollam@gmail.com>
-rw-r--r-- | http/http_client.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/http/http_client.hpp b/http/http_client.hpp index 0bfb3818df..107f943923 100644 --- a/http/http_client.hpp +++ b/http/http_client.hpp @@ -706,7 +706,7 @@ class ConnectionPool : public std::enable_shared_from_this<ConnectionPool> // Server is not keep-alive enabled so we need to close the // connection and then start over from resolve conn->doClose(); - conn->doResolve(); + conn->restartConnection(); } return; } @@ -760,7 +760,7 @@ class ConnectionPool : public std::enable_shared_from_this<ConnectionPool> { BMCWEB_LOG_DEBUG("Reusing existing connection {}", commonMsg); - conn->doResolve(); + conn->restartConnection(); } return; } |