Ensure reload thread is started up even if init fails.
[shibboleth/cpp-opensaml.git] / saml / saml2 / metadata / impl / XMLMetadataProvider.cpp
index ff726e9..df85913 100644 (file)
@@ -57,8 +57,14 @@ namespace opensaml {
             }
 
             void init() {
-                background_load();
-                startup();
+                try {
+                    background_load();
+                    startup();
+                }
+                catch (...) {
+                    startup();
+                    throw;
+                }
             }
 
             const XMLObject* getMetadata() const {