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

modules/s_fetch: Call for explicit destruction/cancel on error.

This commit is contained in:
Jason Volk 2019-04-15 12:54:35 -07:00
parent 0e0d95b266
commit fde3e48fbf

View file

@ -830,7 +830,7 @@ try
request.started = ircd::time();
request.last = ircd::time();
static_cast<m::v1::event &>(request) =
*static_cast<m::v1::event *>(&request) =
{
request.event_id, request.buf, std::move(opts)
};
@ -864,6 +864,8 @@ catch(const std::exception &e)
e.what()
};
server::cancel(request);
static_cast<m::v1::event *>(&request)->~event();
request.origin = {};
return false;
}