mirror of
https://github.com/matrix-construct/construct
synced 2024-11-30 02:32:43 +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.started = ircd::time();
|
||||||
|
|
||||||
request.last = 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)
|
request.event_id, request.buf, std::move(opts)
|
||||||
};
|
};
|
||||||
|
@ -864,6 +864,8 @@ catch(const std::exception &e)
|
||||||
e.what()
|
e.what()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
server::cancel(request);
|
||||||
|
static_cast<m::v1::event *>(&request)->~event();
|
||||||
request.origin = {};
|
request.origin = {};
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue