asio: Avoid delay in reading pending i/o

In a scenario where i/o is pending on socket before io_context loop is
run, the current implementation does not read the pending i/o when io
loop starts. When another i/o operation queues up after i/o loop has
started, the previous pending i/o is read. This delay in reading i/o can
be avoided by inoking read_immediate() in connection constructor instead
of read_wait().

A real world use case is
https://github.com/openbmc/bmcweb/blob/7a696974d7a987e3eb135a6cbad0a4ace8d109d2/src/webserver_main.cpp#L92
where in RedfishAggregator instantiation, GetManagedObjects to
entity-manager returns before io_context loop kicks off and the callback
never invokes until a new async_method_call queues a response which then
invokes the long pending  RedfishAggregator callback.

Change-Id: I4e2d1b407e96c7a4078cd7bd90443699ba0d6623
Signed-off-by: Rahul Kapoor <rahulkpr@google.com>
diff --git a/include/sdbusplus/asio/connection.hpp b/include/sdbusplus/asio/connection.hpp
index 62514ab..841c6d7 100644
--- a/include/sdbusplus/asio/connection.hpp
+++ b/include/sdbusplus/asio/connection.hpp
@@ -56,12 +56,12 @@
         sdbusplus::bus_t(sdbusplus::bus::new_default()), io_(io),
         socket(io_.get_executor(), get_fd())
     {
-        read_wait();
+        read_immediate();
     }
     connection(boost::asio::io_context& io, sd_bus* bus) :
         sdbusplus::bus_t(bus), io_(io), socket(io_.get_executor(), get_fd())
     {
-        read_wait();
+        read_immediate();
     }
     ~connection()
     {