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

modules/m_fetch: Explicitly cancel request after assignment failure.

This commit is contained in:
Jason Volk 2019-07-13 17:18:53 -07:00
parent f33f65040d
commit 2489ae02ff

View file

@ -948,11 +948,18 @@ try
if(!request.started) if(!request.started)
request.started = ircd::time(); request.started = ircd::time();
request.last = ircd::time(); request.last = ircd::time(); try
*static_cast<m::v1::event *>(&request) =
{ {
request.event_id, request.buf, std::move(opts) *static_cast<m::v1::event *>(&request) =
}; {
request.event_id, request.buf, std::move(opts)
};
}
catch(...)
{
cancel(request);
throw;
}
log::debug log::debug
{ {