mirror of
https://github.com/matrix-construct/construct
synced 2024-11-26 16:52:44 +01:00
modules/s_fetch: Call for explicit destruction/cancel on error.
This commit is contained in:
parent
0e0d95b266
commit
fde3e48fbf
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue