diff --git a/ircd/client.cc b/ircd/client.cc index 03b846138..5fcd550ec 100644 --- a/ircd/client.cc +++ b/ircd/client.cc @@ -890,7 +890,6 @@ catch(const std::system_error &) catch(const http::error &e) { const ctx::exception_handler eh; - if(!empty(e.content)) log::derror { @@ -902,6 +901,9 @@ catch(const http::error &e) e.content }; + if(!sock || sock->fini) + return false; + resource::response { *this, e.content, "text/html; charset=utf-8", e.code, e.headers @@ -936,6 +938,9 @@ catch(const std::exception &e) e.what() }; + if(!sock || sock->fini) + return false; + resource::response { *this, e.what(), "text/html; charset=utf-8", http::INTERNAL_SERVER_ERROR