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

Fix processing_queue stop #4082

Merged
merged 2 commits into from
Jan 30, 2023

Conversation

pwojcikdev
Copy link
Contributor

Deadlocks were possible during node stopping due to invalid stop logic.

@@ -30,6 +30,8 @@ TEST (processing_queue, process_one)
ASSERT_TIMELY (5s, processed == 1);
ASSERT_ALWAYS (1s, processed == 1);
ASSERT_EQ (queue.size (), 0);

queue.stop ();
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe these will cause a segfault if the test fails. Since the call to stop is no longer associated with a destructor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True, if it fails it will be messy. I added a RAII wrapper that ensures stop will always be called

@pwojcikdev pwojcikdev merged commit 7e9f6e8 into nanocurrency:develop Jan 30, 2023
@thsfs thsfs added the bug label Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants