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:
parent
972830e188
commit
b0c0970d69
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue