25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Start ezlib only if required, as it's optional (#1006)

This commit is contained in:
Badlop 2016-03-16 11:11:43 +01:00
parent 74053b114e
commit c985a2bd3d
2 changed files with 1 additions and 1 deletions

View File

@ -256,7 +256,6 @@ start_apps() ->
ejabberd:start_app(fast_tls), ejabberd:start_app(fast_tls),
ejabberd:start_app(fast_xml), ejabberd:start_app(fast_xml),
ejabberd:start_app(stringprep), ejabberd:start_app(stringprep),
ejabberd:start_app(ezlib),
ejabberd:start_app(cache_tab). ejabberd:start_app(cache_tab).
opt_type(net_ticktime) -> opt_type(net_ticktime) ->

View File

@ -141,6 +141,7 @@ handle_call({starttls, TLSSocket}, _From, State) ->
handle_call({compress, Data}, _From, handle_call({compress, Data}, _From,
#state{socket = Socket, sock_mod = SockMod} = #state{socket = Socket, sock_mod = SockMod} =
State) -> State) ->
ejabberd:start_app(ezlib),
{ok, ZlibSocket} = ezlib:enable_zlib(SockMod, {ok, ZlibSocket} = ezlib:enable_zlib(SockMod,
Socket), Socket),
if Data /= undefined -> do_send(State, Data); if Data /= undefined -> do_send(State, Data);