mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
ejabberd_listener: Let supervisor terminate child
If a TCP connection was closed before the socket was handed over to a supervised child process, let the supervisor terminate the process rather than killing it directly. This avoids crash log entries generated by the supervisor.
This commit is contained in:
parent
865074603c
commit
5649e35a64
@ -307,7 +307,12 @@ start_connection(Module, Arity, Socket, State, Sup) ->
|
||||
Module:accept(Pid),
|
||||
{ok, Pid};
|
||||
Err ->
|
||||
exit(Pid, kill),
|
||||
case Sup of
|
||||
undefined ->
|
||||
exit(Pid, kill);
|
||||
_ ->
|
||||
supervisor:terminate_child(Sup, Pid)
|
||||
end,
|
||||
Err
|
||||
end;
|
||||
Err ->
|
||||
|
Loading…
Reference in New Issue
Block a user