Don't exit program if state file could not be pared (for example corrupted or empty...
[bpdyndnsd] / src / serviceholder.cpp
index c1c02e7..7f7968f 100644 (file)
@@ -132,10 +132,12 @@ int Serviceholder::deserialize_services()
         }
         catch( const boost::archive::archive_exception& e )
         {
+            // There is a corrupted object file, continue without recovering old Services' state.
             Log->print_exception_deserialize(e.what());
             ifs.close();
-            return -1;
+            return 0;
         }
+
         SerializeServiceContainer::Ptr service_container(_service_container);
         IPAddrHelp = IPAddrHelper::Ptr(_ip_addr_helper);
         ifs.close();