mod_http_upload_quota: Log unexpected 'sweep'
Log an error message if the mod_http_upload_quota process receives a 'sweep' message despite the "max_days" option not being specified.
This commit is contained in:
parent
1ff5cbc467
commit
dd34fc63c8
|
@ -190,11 +190,10 @@ handle_cast(Request, State) ->
|
||||||
|
|
||||||
-spec handle_info(_, state()) -> {noreply, state()}.
|
-spec handle_info(_, state()) -> {noreply, state()}.
|
||||||
|
|
||||||
handle_info(sweep, #state{max_days = infinity} = State) -> % Shouldn't happen.
|
|
||||||
{noreply, State};
|
|
||||||
handle_info(sweep, #state{server_host = ServerHost,
|
handle_info(sweep, #state{server_host = ServerHost,
|
||||||
docroot = DocRoot,
|
docroot = DocRoot,
|
||||||
max_days = MaxDays} = State) ->
|
max_days = MaxDays} = State)
|
||||||
|
when is_integer(MaxDays), MaxDays > 0 ->
|
||||||
?DEBUG("Got 'sweep' message for ~s", [ServerHost]),
|
?DEBUG("Got 'sweep' message for ~s", [ServerHost]),
|
||||||
case file:list_dir(DocRoot) of
|
case file:list_dir(DocRoot) of
|
||||||
{ok, Entries} ->
|
{ok, Entries} ->
|
||||||
|
|
Loading…
Reference in New Issue