0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-29 00:03:45 +02:00

ircd:Ⓜ️:fetch: Prevent fetch requests from starting based on global conditions.

This commit is contained in:
Jason Volk 2020-02-22 13:26:51 -08:00
parent 972830e188
commit b0c0970d69

View file

@ -396,6 +396,12 @@ bool
ircd::m::fetch::start(request &request)
try
{
if(unlikely(run::level != run::level::RUN || ctx::termination(request_context)))
throw m::UNAVAILABLE
{
"Cannot start fetch requests at this time."
};
assert(!request.finished);
if(!request.started && !request.origin)
request.origin = request.opts.hint;