From 40078a99de423bb437acd2fcc1c42a9f920b0cfa Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 21 Nov 2016 14:14:43 -0800 Subject: Make parse failure of local.conf non-fatal in case people have ancient files sitting around. --- service/OneService.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/service/OneService.cpp b/service/OneService.cpp index 425c8ef9..289f0cbc 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -847,16 +847,10 @@ public: try { _localConfig = json::parse(lcbuf); if (!_localConfig.is_object()) { - Mutex::Lock _l(_termReason_m); - _termReason = ONE_UNRECOVERABLE_ERROR; - _fatalErrorMessage = "invalid local.conf (content is not JSON object)"; - return _termReason; + fprintf(stderr,"WARNING: unable to parse local.conf (root element is not a JSON object)" ZT_EOL_S); } } catch ( ... ) { - Mutex::Lock _l(_termReason_m); - _termReason = ONE_UNRECOVERABLE_ERROR; - _fatalErrorMessage = "invalid local.conf (JSON parse error)"; - return _termReason; + fprintf(stderr,"WARNING: unable to parse local.conf (invalid JSON)" ZT_EOL_S); } } -- cgit v1.2.3