Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Possible deadlock in FindPeers #67

Closed
r0qs opened this issue Mar 2, 2021 · 0 comments · Fixed by #69
Closed

Possible deadlock in FindPeers #67

r0qs opened this issue Mar 2, 2021 · 0 comments · Fixed by #69
Labels
effort/hours Estimated to take one or several hours kind/bug A bug in existing code (including security flaws) status/ready Ready to be worked

Comments

@r0qs
Copy link

r0qs commented Mar 2, 2021

Hi, I don't know if this library still maintained, but if chLen is smaller than c.prevPeers a deadlock can occur here due to a full buffered channel, no?

I suppose that the comparison in this line was intended to be the inverse logic: chLen < len(c.prevPeers), which fix the deadlock.

@aschmahmann aschmahmann self-assigned this Mar 2, 2021
@aschmahmann aschmahmann added effort/hours Estimated to take one or several hours kind/bug A bug in existing code (including security flaws) status/ready Ready to be worked labels Apr 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
effort/hours Estimated to take one or several hours kind/bug A bug in existing code (including security flaws) status/ready Ready to be worked
Projects
None yet
2 participants