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

Crash report when socket accidentally closes #2

Open
tbstenbock opened this issue May 26, 2018 · 0 comments
Open

Crash report when socket accidentally closes #2

tbstenbock opened this issue May 26, 2018 · 0 comments

Comments

@tbstenbock
Copy link

In the situation where socket connection to RethinkDB server is lost then gen_rethink issues a crash report instead of graceful shutdown. Even when using gen_rethink_session this is happening. The reason for this is the following handle_info statement int he gen_rethink.erl file:

handle_info({tcp_closed, Socket}, State=#{socket := Socket}) ->
{stop, closed, State};

Which should be modified to:

handle_info({tcp_closed, Socket}, State=#{socket := Socket}) ->
{stop, {shutdown, closed}, State};

And with this the crash report is avoided and hence false alarms are avoided.

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