network_manager: Ensure that systemd-networkd is ready

We have some instances where systemd-networkd takes longer than usual
to configure. Combined with a service that manipulates network settings,
this sometimes causes addresses and routes to be lost because
phosphor-networkd writes new configurations before the configs are even
loaded from the RWFS.

Change-Id: I3dac95a0d54840423c0b0197a123318954a2e56a
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/network_manager_main.cpp b/src/network_manager_main.cpp
index 9153f28..c295996 100644
--- a/src/network_manager_main.cpp
+++ b/src/network_manager_main.cpp
@@ -318,7 +318,10 @@
 #endif
 
     // Trigger the initial object scan
-    phosphor::network::refreshObjects();
+    // This is intentionally deferred, to ensure that systemd-networkd is
+    // fully configured.
+    phosphor::network::refreshObjectTimer->restartOnce(
+        phosphor::network::refreshTimeout);
 
     sd_event_loop(eventPtr.get());
 }