diff --git a/src/emqttd_ws_client_sup.erl b/src/emqttd_ws_client_sup.erl index d01055115..60e1461b7 100644 --- a/src/emqttd_ws_client_sup.erl +++ b/src/emqttd_ws_client_sup.erl @@ -1,5 +1,5 @@ %%-------------------------------------------------------------------- -%% Copyright (c) 2012-2017 Feng Lee . +%% Copyright (c) 2013-2017 EMQ Enterprise, Inc. (http://emqtt.io) %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -37,8 +37,9 @@ start_client(WsPid, Req, ReplyChannel) -> %%-------------------------------------------------------------------- %% Supervisor callbacks %%-------------------------------------------------------------------- + init([]) -> - {ok, Env} = emqttd:env(protocol), + Env = lists:append(emqttd:env(client), emqttd:env(protocol)), {ok, {{simple_one_for_one, 0, 1}, [{ws_client, {emqttd_ws_client, start_link, [Env]}, temporary, 5000, worker, [emqttd_ws_client]}]}}.