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

Capture SIGINT and SIGTERM to clean up sockets #2018

Merged
merged 2 commits into from
Jun 11, 2019

Conversation

wezrule
Copy link
Contributor

@wezrule wezrule commented May 22, 2019

This replaces #1845 which got a bit out of date with the new processes.

I wasn't able to reproduce any socket problems when using ctrl + c or kill while any of the processes were running, so was hard for me to test but it didn't make it worse at least. I used the same principle (although a slightly different approach) as @devinus did in the original PR which solves issues he was apparently having with sockets not being cleaned up if abruptly stopping the daemon.

Clearing the transports in ipc_server::stop (a previous review comment) caused some lifetime issues in the async handlers so I have not pursued this currently.

@wezrule wezrule added the functionality quality improvements This item indicates the need for or supplies a better way to implement existing functionality label May 22, 2019
@wezrule wezrule added this to the V19.0 milestone May 22, 2019
@wezrule wezrule requested a review from clemahieu May 22, 2019 20:49
@wezrule wezrule self-assigned this May 22, 2019
@zhyatt zhyatt requested a review from cryptocode June 10, 2019 14:24
Copy link
Contributor

@cryptocode cryptocode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, handlers called on testing nano_node

@wezrule wezrule merged commit 415dfad into nanocurrency:master Jun 11, 2019
@wezrule wezrule deleted the handle_sigterm_and_sigint branch June 11, 2019 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
functionality quality improvements This item indicates the need for or supplies a better way to implement existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants