mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Start ezlib only if required, as it's optional (#1006)
This commit is contained in:
parent
74053b114e
commit
c985a2bd3d
@ -256,7 +256,6 @@ start_apps() ->
|
||||
ejabberd:start_app(fast_tls),
|
||||
ejabberd:start_app(fast_xml),
|
||||
ejabberd:start_app(stringprep),
|
||||
ejabberd:start_app(ezlib),
|
||||
ejabberd:start_app(cache_tab).
|
||||
|
||||
opt_type(net_ticktime) ->
|
||||
|
@ -141,6 +141,7 @@ handle_call({starttls, TLSSocket}, _From, State) ->
|
||||
handle_call({compress, Data}, _From,
|
||||
#state{socket = Socket, sock_mod = SockMod} =
|
||||
State) ->
|
||||
ejabberd:start_app(ezlib),
|
||||
{ok, ZlibSocket} = ezlib:enable_zlib(SockMod,
|
||||
Socket),
|
||||
if Data /= undefined -> do_send(State, Data);
|
||||
|
Loading…
Reference in New Issue
Block a user