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

ircd:Ⓜ️:fetch: Add run::level check in start().

This commit is contained in:
Jason Volk 2019-09-10 18:02:26 -07:00
parent 6cbef6b000
commit 08b3b6cddc

View file

@ -432,6 +432,13 @@ ircd::m::fetch::start(request &request,
const string_view &remote)
try
{
if(unlikely(run::level != run::level::RUN))
throw m::UNAVAILABLE
{
"Cannot take requests in runlevel %s",
reflect(run::level),
};
assert(!request.finished);
request.last = ircd::now<system_point>();
if(!request.started)
@ -503,6 +510,10 @@ try
dock.notify_all();
return true;
}
catch(const m::UNAVAILABLE &e)
{
throw;
}
catch(const http::error &e)
{
log::logf