Adjusting code

This commit is contained in:
linjun 2019-02-27 14:39:49 +08:00
parent e1a5188d09
commit 44529a278d
2 changed files with 2 additions and 2 deletions

View File

@ -135,7 +135,7 @@ init([Transport, RawSocket, Options]) ->
ProtoState = emqx_protocol:init(#{peername => Peername, ProtoState = emqx_protocol:init(#{peername => Peername,
sockname => Sockname, sockname => Sockname,
peercert => Peercert, peercert => Peercert,
sendfun => SendFun}, [Options ++ [{socktype, SockType}]]), sendfun => SendFun}, Options ++ [{socktype, SockType}]),
ParserState = emqx_protocol:parser(ProtoState), ParserState = emqx_protocol:parser(ProtoState),
GcPolicy = emqx_zone:get_env(Zone, force_gc_policy, false), GcPolicy = emqx_zone:get_env(Zone, force_gc_policy, false),
GcState = emqx_gc:init(GcPolicy), GcState = emqx_gc:init(GcPolicy),

View File

@ -126,7 +126,7 @@ websocket_init(#state{request = Req, options = Options}) ->
ProtoState = emqx_protocol:init(#{peername => Peername, ProtoState = emqx_protocol:init(#{peername => Peername,
sockname => Sockname, sockname => Sockname,
peercert => Peercert, peercert => Peercert,
sendfun => send_fun(self())}, [Options ++ [{socktype, websocket}]]), sendfun => send_fun(self())}, Options ++ [{socktype, websocket}]),
ParserState = emqx_protocol:parser(ProtoState), ParserState = emqx_protocol:parser(ProtoState),
Zone = proplists:get_value(zone, Options), Zone = proplists:get_value(zone, Options),
EnableStats = emqx_zone:get_env(Zone, enable_stats, true), EnableStats = emqx_zone:get_env(Zone, enable_stats, true),