Skip to content

Fix hearbeat thread shutdown race condition#565

Merged
franku merged 2 commits intomasterfrom
dev/franku/master/heartbeat-shutdown
Aug 13, 2020
Merged

Fix hearbeat thread shutdown race condition#565
franku merged 2 commits intomasterfrom
dev/franku/master/heartbeat-shutdown

Conversation

@franku
Copy link
Contributor

@franku franku commented Aug 5, 2020

This is a quick fix for the heartbeat shutdown where it could happen that the thread is already down but the stopping thread is still waiting for it to start. However this works the complete heartbeat code should be refactored again.

The fix uses a new variable that is only set if the thread has been started once.

Otherwise I left the code as much as before as I could.

Copy link
Member

@arogge arogge left a comment

Choose a reason for hiding this comment

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

I'm not sure I understand the purpose 100%, but it looks good to me.

@franku franku force-pushed the dev/franku/master/heartbeat-shutdown branch from 17fdd83 to 8980ca5 Compare August 12, 2020 14:39
@franku
Copy link
Contributor Author

franku commented Aug 13, 2020

Jenkins build #5 succeeded completely on commit 8980ca5.

@franku franku merged commit c59228e into master Aug 13, 2020
@franku franku deleted the dev/franku/master/heartbeat-shutdown branch August 13, 2020 14:32
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

Successfully merging this pull request may close these issues.

2 participants