0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

ircd::client: Skip attempt at response when socket d/c'ed on exception.

This commit is contained in:
Jason Volk 2019-08-18 05:29:18 -07:00
parent a49560cd1a
commit f0e817b8f2

View file

@ -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