diff --git a/getting-started/mix-otp/task-and-gen-tcp.markdown b/getting-started/mix-otp/task-and-gen-tcp.markdown index a8fc8f4b2..304ce69a1 100644 --- a/getting-started/mix-otp/task-and-gen-tcp.markdown +++ b/getting-started/mix-otp/task-and-gen-tcp.markdown @@ -43,6 +43,7 @@ end defp loop_acceptor(socket) do {:ok, client} = :gen_tcp.accept(socket) serve(client) + loop_acceptor(socket) end defp serve(socket) do @@ -51,7 +52,6 @@ defp serve(socket) do |> write_line(socket) serve(socket) - loop_acceptor(socket) end defp read_line(socket) do