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

only pass keys down newBlocks chan in bitswap #3271

Merged
merged 1 commit into from
Sep 30, 2016
Merged

Conversation

whyrusleeping
Copy link
Member

should fix #3262 #3199 and #3246

License: MIT
Signed-off-by: Jeromy why@ipfs.io

License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
@whyrusleeping whyrusleeping added the status/in-progress In progress label Sep 29, 2016
@whyrusleeping
Copy link
Member Author

cc @Kubuxu for review

@@ -308,12 +308,17 @@ func (bs *Bitswap) HasBlock(blk blocks.Block) error {
return err
}

// NOTE: There exists the possiblity for a race condition here. If a user
Copy link
Member

Choose a reason for hiding this comment

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

Can you create issue for that?

Copy link
Member Author

Choose a reason for hiding this comment

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

Created: #3274

@@ -137,7 +137,7 @@ type Bitswap struct {

process process.Process

newBlocks chan blocks.Block
newBlocks chan key.Key
Copy link
Member

Choose a reason for hiding this comment

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

Maybe rename to newKeys?
but current name also fits.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, newBlocks still makes sense to me. I'm going to keep it as is

@Kubuxu
Copy link
Member

Kubuxu commented Sep 29, 2016

Two comments but generally LGTM

@whyrusleeping whyrusleeping merged commit dcb21bd into master Sep 30, 2016
@whyrusleeping whyrusleeping deleted the fix/race-panic branch September 30, 2016 00:23
@whyrusleeping whyrusleeping removed the status/in-progress In progress label Sep 30, 2016
@ghost ghost mentioned this pull request Dec 23, 2016
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.

Panic while running daemon
2 participants