Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

one question about mysql_recv Socket closed #16

Open
fangjie008 opened this issue Nov 13, 2012 · 0 comments
Open

one question about mysql_recv Socket closed #16

fangjie008 opened this issue Nov 13, 2012 · 0 comments

Comments

@fangjie008
Copy link

if mysql socket closed (my be the network broken)
when i fetch

finally go to here:

do_recv(LogFun, RecvPid, SeqNum) when is_function(LogFun);
LogFun == undefined,
SeqNum == undefined ->
receive
{mysql_recv, RecvPid, data, Packet, Num} ->
{ok, Packet, Num};
{mysql_recv, RecvPid, closed, _E} ->
{error, io_lib:format("mysql_recv: socket was closed ~p", [_E])}
end;
do_recv(LogFun, RecvPid, SeqNum) when is_function(LogFun);
LogFun == undefined,
is_integer(SeqNum) ->
ResponseNum = SeqNum + 1,
receive
{mysql_recv, RecvPid, data, Packet, ResponseNum} ->
{ok, Packet, ResponseNum};
{mysql_recv, RecvPid, closed, _E} ->
{error, io_lib:format("mysql_recv: socket was closed ~p", [_E])}
end.

this function return {error, Reason}
the mysql_conn process will already alive but the mysql_recv process dead
why we don't close the mysql_conn process here since it no use!!
it not restart no use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant