network_manager: Make it possible to reload without refresh

Change-Id: I2bef32285cd620c93914907eb74864c5801258bf
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/network_manager.cpp b/src/network_manager.cpp
index f69cd74..beb677a 100644
--- a/src/network_manager.cpp
+++ b/src/network_manager.cpp
@@ -177,9 +177,14 @@
 
 #endif
 
-void Manager::reloadConfigs()
+void Manager::reloadConfigsNoRefresh()
 {
     reloadTimer->restartOnce(reloadTimeout);
+}
+
+void Manager::reloadConfigs()
+{
+    reloadConfigsNoRefresh();
     // Ensure that the next refresh happens after reconfiguration
     refreshObjectTimer->setRemaining(reloadTimeout + refreshTimeout);
 }
@@ -212,7 +217,10 @@
         elog<InternalFailure>();
     }
     // Ensure reconfiguration has enough time
-    refreshObjectTimer->setRemaining(refreshTimeout);
+    if (refreshObjectTimer->isEnabled())
+    {
+        refreshObjectTimer->setRemaining(refreshTimeout);
+    }
 }
 
 } // namespace network
diff --git a/src/network_manager.hpp b/src/network_manager.hpp
index 0f37134..f265439 100644
--- a/src/network_manager.hpp
+++ b/src/network_manager.hpp
@@ -118,6 +118,7 @@
     /** @brief Arms a timer to tell systemd-network to reload all of the network
      * configurations
      */
+    virtual void reloadConfigsNoRefresh();
     virtual void reloadConfigs();
 
     /** @brief Tell systemd-network to reload all of the network configurations