diff --git a/src/ejabberd_listener.erl b/src/ejabberd_listener.erl index 309e167df..41eec8c1e 100644 --- a/src/ejabberd_listener.erl +++ b/src/ejabberd_listener.erl @@ -318,6 +318,9 @@ start_connection(Module, Arity, Socket, State, Sup) -> supervisor:start_child(Sup, [{gen_tcp, Socket}, State]) end, case Res of + {ok, Pid, preowned_socket} -> + Module:accept(Pid), + {ok, Pid}; {ok, Pid} -> case gen_tcp:controlling_process(Socket, Pid) of ok ->