From 9f458938db479c4c7d8a04e5d989b4f2409871c7 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sat, 15 Dec 2018 17:13:35 -0800 Subject: [PATCH] ircd: Gracefully ignore termination propagated from ircd::main(). --- ircd/ircd.cc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/ircd/ircd.cc b/ircd/ircd.cc index 787d8c0a3..610da7556 100644 --- a/ircd/ircd.cc +++ b/ircd/ircd.cc @@ -237,18 +237,29 @@ noexcept try // executes backwards from this point and shuts down IRCd. ctx::wait(); } -catch(const m::error &e) +catch(const http::error &e) // <-- m::error { log::critical { - "IRCd main exited :%s %s", e.what(), e.content + "IRCd main :%s %s", e.what(), e.content }; } +catch(const std::exception &e) +{ + log::critical + { + "IRCd main :%s", e.what() + }; +} +catch(const ctx::terminated &) +{ + return; +} catch(...) { log::critical { - "IRCd main exited :%s", what(std::current_exception()) + "IRCd main error." }; }