Don't forget to close the gen_server upon tcp_closed
This commit is contained in:
parent
fc510c07a1
commit
9639e08a4f
@ -45,6 +45,7 @@ start_link(TcpSock, Rx, Tx, Owner, {Active0, Buf}) ->
|
|||||||
flush_tcp(Pid, TcpSock),
|
flush_tcp(Pid, TcpSock),
|
||||||
{ok, Pid};
|
{ok, Pid};
|
||||||
Err = {error, _} ->
|
Err = {error, _} ->
|
||||||
|
close(Pid),
|
||||||
Err
|
Err
|
||||||
end;
|
end;
|
||||||
Err = {error, _} ->
|
Err = {error, _} ->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user