diff --git a/service/OneService.cpp b/service/OneService.cpp index f3ec3e665..1c55ef94a 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -1353,8 +1353,8 @@ public: if (j.is_object()) { seed = Utils::hexStrToU64(OSUtils::jsonString(j["seed"],"0").c_str()); } + } catch (std::exception &exc) { } catch ( ... ) { - // discard invalid JSON } std::vector moons(_node->moons()); @@ -1403,8 +1403,8 @@ public: json &allowDefault = j["allowDefault"]; if (allowDefault.is_boolean()) localSettings.allowDefault = (bool)allowDefault; } + } catch (std::exception &exc) { } catch ( ... ) { - // discard invalid JSON } setNetworkSettings(nws->networks[i].nwid,localSettings); @@ -2035,6 +2035,8 @@ public: return; } + } catch (std::exception &exc) { + _phy.close(sock); } catch ( ... ) { _phy.close(sock); } @@ -2143,6 +2145,10 @@ public: #endif _nets.erase(nwid); return -999; + } catch (std::exception &exc) { + return -999; + } catch (int exc) { + return -999; } catch ( ... ) { return -999; // tap init failed }