25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Fixes a leak of ejabberd_receiver processes.

When a (non-frontend) socket module without any custom receiver fails to
start, the newly created ejabberd_receiver process needs to be properly
closed.
This commit is contained in:
Jonas Ådahl 2010-10-30 20:33:13 +02:00 committed by Badlop
parent dccaff0544
commit 2f68733708

View File

@ -87,7 +87,13 @@ start(Module, SockMod, Socket, Opts) ->
end,
ReceiverMod:become_controller(Receiver, Pid);
{error, _Reason} ->
SockMod:close(Socket)
SockMod:close(Socket),
case ReceiverMod of
ejabberd_receiver ->
ReceiverMod:close(Receiver);
_ ->
ok
end
end;
independent ->
ok;