mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +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:
parent
5168f68946
commit
bacecae3dd
@ -90,7 +90,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;
|
||||
|
Loading…
Reference in New Issue
Block a user