Hi.
I have a problem with one module of ejabberd. It is http_bind. But when I debug deeply I found that after accept socket and spawning hadling process and when reasign process for recieve data for new created process by calling gen_tcp:controlling_process() failed with badarg, WHY?
...
{ok, Socket} = get_tcp:accept(ListenSocket),
Opts = [{active, false}, ...],
% here function return result of proc_lib:spawn_link(handler, ...)
{ok, Pid} = ejabberd_http:start({gen_tcp, Socket}, Opts),
gen_tcp:controlling_process(Socket, Pid),
: {badarg, [
{erlang, port_connect, [#Port<0.140743856>, <0.5939.4350>]},
{inet, tcp_controlling_process, 2},
{ejabberd_socket,start,4},
{ejabberd_listener,accept,3},
{proc_lib,init_p,5}
]}
any help?