aboutsummaryrefslogtreecommitdiff
path: root/src/mod_http_fileserver.erl
diff options
context:
space:
mode:
authorEvgeny Khramtsov <ekhramtsov@process-one.net>2019-08-04 21:46:18 +0300
committerEvgeny Khramtsov <ekhramtsov@process-one.net>2019-08-04 21:46:18 +0300
commit2168489ddf96a88d4b4885a1a0a986acb25754c5 (patch)
tree6eb6aa952467a4b30977d603cd05c6644c259893 /src/mod_http_fileserver.erl
parentUse tagged version for yconf as well (diff)
Don't retain module option on gen_mod supervisor
When module's options were updated (e.g. by reloading ejabberd.yml) and, later, the module's process crashed, gen_mod supervisor restarts the process with outdated options. This is now fixed.
Diffstat (limited to 'src/mod_http_fileserver.erl')
-rw-r--r--src/mod_http_fileserver.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mod_http_fileserver.erl b/src/mod_http_fileserver.erl
index 556651ef8..2e6aa3358 100644
--- a/src/mod_http_fileserver.erl
+++ b/src/mod_http_fileserver.erl
@@ -110,7 +110,8 @@ depends(_Host, _Opts) ->
%% {stop, Reason}
%% Description: Initiates the server
%%--------------------------------------------------------------------
-init([Host, Opts]) ->
+init([Host|_]) ->
+ Opts = gen_mod:get_module_opts(Host, ?MODULE),
try initialize(Host, Opts) of
State ->
process_flag(trap_exit, true),