bus: use infinity for default timeout
A value of zero meant don't block at all.
Change-Id: Id148a63e9f212ba67ec04d50ff27e92d15689369
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/sdbusplus/bus.hpp b/sdbusplus/bus.hpp
index 2dec979..7cb27b7 100644
--- a/sdbusplus/bus.hpp
+++ b/sdbusplus/bus.hpp
@@ -1,6 +1,7 @@
#pragma once
#include <memory>
+#include <climits>
#include <systemd/sd-bus.h>
#include <sdbusplus/message.hpp>
@@ -69,7 +70,7 @@
*
* @param[in] timeout_us - Timeout in usec.
*/
- void wait(uint64_t timeout_us = 0)
+ void wait(uint64_t timeout_us = ULLONG_MAX)
{
sd_bus_wait(_bus.get(), timeout_us);
}