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:
parent
a49560cd1a
commit
f0e817b8f2
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue