Home
last modified time | relevance | path

Searched hist:"513 d1ffc" (Results 1 – 1 of 1) sorted by relevance

/openbmc/bmcweb/http/
H A Dhttp_client.hpp513d1ffc Mon Jul 18 19:38:15 CDT 2022 Carson Labrado <clabrado@google.com> HTTP Client: Improve handling operation timeouts

Now that we are using timer.async_wait() with the async http
operations we need to account for the scenario where the timer fails
before the operation fails. When that occurs we need to abort the
operation once its callback gets called.

Currently we proceed as if the timer doesn't exist. This causes a
fault if one of the operations times out. This patch adds a check
to the start of each async operation so that we do not continue with
the normal message sending flow when an operation times out.

Tested:
In order to create a connection timeout I created a dummy interface
and set the IP of my satellite BMC to route to the interface:
ip link add dummy0 type dummy
ip link set dev dummy0 up
ip route add 120.60.30.15 dev dummy0

All packets sent to 120.60.30.15 will get dropped and thus connection
attempts will timeout. This does not cause bmcweb to crash.

To make the satellite reachable again I used
this command to delete the routing:
ip route del 120.60.31.15 dev dummy0

After doing so messages were once again able to be forwarded correctly
to the satellite.

Signed-off-by: Carson Labrado <clabrado@google.com>
Change-Id: Ie8d022c2195838e383eefcd0e12ae8cfab76e3e1