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 Possible Polling Deadlock #213

Merged
merged 2 commits into from
Aug 4, 2023

Conversation

nepet
Copy link
Contributor

@nepet nepet commented Aug 2, 2023

Fixes a potential mutex deadlock that might be the reason for the store node to disappear from the peerswap-peerlist. The potential deadlock was introduced in #189.

The `else` statement of the sendMessage function as accidentally
attached to the inner condition and could cause a deadlock when on
back to back error sendind out the poll to the same peer

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
This is mainly to make the tests more stable as we don't have
blocktime lag in regtest scenarios. But it does not hurt to have
the extra check in real life also.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
@nepet nepet linked an issue Aug 2, 2023 that may be closed by this pull request
@wtogami
Copy link
Contributor

wtogami commented Aug 4, 2023

tested ACK, seems to fix #185

@wtogami wtogami merged commit 167e088 into ElementsProject:master Aug 4, 2023
6 checks passed
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.

Peer disappears from peerswap-listpeers randomly
2 participants