Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

network/retrieval: fix request race #1902

Merged
merged 1 commit into from
Oct 23, 2019
Merged

network/retrieval: fix request race #1902

merged 1 commit into from
Oct 23, 2019

Conversation

acud
Copy link
Member

@acud acud commented Oct 23, 2019

This PR fixes a race condition where a retrieve request has been answered by a node before the peer.addRetrieval function has been called.

discovered as an edge case when running two Swarm nodes within a VM (but could not be reproduced on a host system)

answered before peer.addRetrieval was called

Co-Authored-By: Ralph Pichler <pichler.ralph@gmail.com>
Copy link
Member

@janos janos left a comment

Choose a reason for hiding this comment

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

Good catch!

@acud acud self-assigned this Oct 23, 2019
@acud
Copy link
Member Author

acud commented Oct 23, 2019

credits go to @ralph-pichler

Copy link
Member

@ralph-pichler ralph-pichler left a comment

Choose a reason for hiding this comment

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

LGTM

@acud acud merged commit e9042ba into master Oct 23, 2019
@acud acud deleted the fix-unsolicited-race branch October 23, 2019 13:59
@acud acud added this to the 0.5.3 milestone Nov 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants