Revert "Fix unhandled monitor initialisation exception"

This reverts commit e1be2b1e55.
This commit is contained in:
abraunegg 2019-10-30 06:33:11 +11:00
parent e1be2b1e55
commit 9b3179540f

View file

@ -671,17 +671,8 @@ int main(string[] args)
signal(SIGINT, &exitHandler);
signal(SIGTERM, &exitHandler);
// attempt to initialise monitor class
try {
m.init(cfg, cfg.getValueLong("verbose") > 0, cfg.getValueBool("skip_symlinks"), cfg.getValueBool("check_nosync"));
} catch (MonitorException e) {
// monitor initialisation failed
log.error("ERROR: ", e.msg);
exit(-1);
}
//if (!cfg.getValueBool("download_only")) m.init(cfg, cfg.getValueLong("verbose") > 0, cfg.getValueBool("skip_symlinks"), cfg.getValueBool("check_nosync"));
if (!cfg.getValueBool("download_only")) {
// initialise the monitor class
if (!cfg.getValueBool("download_only")) m.init(cfg, cfg.getValueLong("verbose") > 0, cfg.getValueBool("skip_symlinks"), cfg.getValueBool("check_nosync"));
// monitor loop
immutable auto checkInterval = dur!"seconds"(cfg.getValueLong("monitor_interval"));
immutable auto logInterval = cfg.getValueLong("monitor_log_frequency");
@ -749,7 +740,6 @@ int main(string[] args)
}
}
}
}
// Workaround for segfault in std.net.curl.Curl.shutdown() on exit
oneDrive.http.shutdown();