Don't forget to close the gen_server upon tcp_closed

This commit is contained in:
Hans Svensson 2018-04-18 10:15:46 +02:00
parent fc510c07a1
commit 9639e08a4f

View File

@ -45,6 +45,7 @@ start_link(TcpSock, Rx, Tx, Owner, {Active0, Buf}) ->
flush_tcp(Pid, TcpSock),
{ok, Pid};
Err = {error, _} ->
close(Pid),
Err
end;
Err = {error, _} ->