Increase power down wait on factory reset

Testing has shows that the chassisoff operation can take up to 10
seconds. If the BMC is rebooted before the chassis power is fully off
then unexpected errors can get logged on the subsequent BMC reboot
because it sees power is on, but all of the needed cached data is gone
due to the factory reset.

Since this is in essence a one way command (the host is issuing a
command that results in the host being powered down) the BMC does not
need to adhere to the standard 5 second IPMI timeout limit.

There are more optimal ways to do this but due to the very limited use
this command gets, a hard coded sleep time is fine.

Tested:
George took an image with this fix and did multiple inband factory reset
commands and verified no issues were found

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I58f97106fe763427ae8e7e75093e344dcc151b5b
diff --git a/oemhandler.cpp b/oemhandler.cpp
index e76405c..78a1e86 100644
--- a/oemhandler.cpp
+++ b/oemhandler.cpp
@@ -346,8 +346,12 @@
                                           ipmi_context_t context)
 {
     sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
-    // The timeout for IPMI commands is 5s
-    constexpr auto powerOffWait = std::chrono::seconds(1);
+
+    // Since this is a one way command (i.e. the host is requesting a power
+    // off of itself and a reboot of the BMC) we can exceed the 5 second
+    // IPMI timeout. Testing has shown that the power off can take up to
+    // 10 seconds so give it at least 15
+    constexpr auto powerOffWait = std::chrono::seconds(15);
     constexpr auto setFactoryWait = std::chrono::seconds(3);
 
     // Power Off Chassis