0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-02 18:18:56 +02: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