diff --git a/client/src/mpc_app.erl b/client/src/mpc_app.erl index 750211e..0082222 100644 --- a/client/src/mpc_app.erl +++ b/client/src/mpc_app.erl @@ -38,7 +38,7 @@ start(_StartType, _StartArgs) -> {ok, HttpLSock} = gen_tcp:listen(HttpPort, [binary, {ip, {0, 0, 0, 0}}, {reuseaddr, true}, - {active, false}, + {active, once}, {backlog, 256}]), case mpc_sup:start_link([Socks5LSock, HttpLSock]) of diff --git a/client/src/mpc_http_child.erl b/client/src/mpc_http_child.erl index b4df968..75c8407 100644 --- a/client/src/mpc_http_child.erl +++ b/client/src/mpc_http_child.erl @@ -134,7 +134,7 @@ handle_cast(_Info, State) -> handle_info(timeout, #state{lsock = LSock, socket = undefined} = State) -> {ok, Socket} = gen_tcp:accept(LSock), mpc_http_sup:start_child(), - {ok, State#state{socket = Socket}, ?TIMEOUT}; + {noreply, State#state{socket = Socket}, ?TIMEOUT}; handle_info(timeout, #state{socket = Socket} = State) when is_port(Socket) ->