25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +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_xml),
ejabberd:start_app(stringprep),
ejabberd:start_app(ezlib),
ejabberd:start_app(cache_tab).
opt_type(net_ticktime) ->

View File

@ -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);