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:
Holger Weiss 2015-10-25 00:56:05 +02:00
parent 1ff5cbc467
commit dd34fc63c8
1 changed files with 2 additions and 3 deletions

View File

@ -190,11 +190,10 @@ handle_cast(Request, 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,
docroot = DocRoot,
max_days = MaxDays} = State) ->
max_days = MaxDays} = State)
when is_integer(MaxDays), MaxDays > 0 ->
?DEBUG("Got 'sweep' message for ~s", [ServerHost]),
case file:list_dir(DocRoot) of
{ok, Entries} ->