mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
Fix memory and port leak when TLS is enabled in HTTP (thanks to Brian Cully)(EJAB-1119)
SVN Revision: 2791
This commit is contained in:
parent
efd99f5b28
commit
21a36819b0
@ -35,6 +35,9 @@
|
||||
receive_headers/1,
|
||||
url_encode/1]).
|
||||
|
||||
%% Callbacks
|
||||
-export([init/2]).
|
||||
|
||||
-include_lib("exmpp/include/exmpp.hrl").
|
||||
|
||||
-include("ejabberd.hrl").
|
||||
@ -83,7 +86,10 @@
|
||||
start(SockData, Opts) ->
|
||||
supervisor:start_child(ejabberd_http_sup, [SockData, Opts]).
|
||||
|
||||
start_link({SockMod, Socket}, Opts) ->
|
||||
start_link(SockData, Opts) ->
|
||||
{ok, proc_lib:spawn_link(ejabberd_http, init, [SockData, Opts])}.
|
||||
|
||||
init({SockMod, Socket}, Opts) ->
|
||||
TLSEnabled = lists:member(tls, Opts),
|
||||
TLSOpts = lists:filter(fun({certfile, _}) -> true;
|
||||
(_) -> false
|
||||
|
Loading…
Reference in New Issue
Block a user