Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

If peer is first to send a block to session, protect connection #406

Merged
merged 4 commits into from
Jun 3, 2020

Conversation

dirkmc
Copy link
Contributor

@dirkmc dirkmc commented Jun 3, 2020

When receiving blocks, if the peer that sent the block was the first to send it, protect the connection to the peer, so that it doesn't get pruned by the connection manager.

@dirkmc dirkmc requested a review from Stebalien June 3, 2020 20:11
@dirkmc dirkmc force-pushed the feat/protect-conns branch from adc1ca7 to c7e7afc Compare June 3, 2020 20:12
Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

LGTM but we should use the session's tag instead of a bare number (to avoid conflicting with other services).

internal/sessionpeermanager/sessionpeermanager.go Outdated Show resolved Hide resolved
internal/sessionpeermanager/sessionpeermanager.go Outdated Show resolved Hide resolved
internal/sessionpeermanager/sessionpeermanager.go Outdated Show resolved Hide resolved
@dirkmc
Copy link
Contributor Author

dirkmc commented Jun 3, 2020

Oh right of course - fixed

@Stebalien Stebalien merged commit 70bced7 into master Jun 3, 2020
@Stebalien Stebalien deleted the feat/protect-conns branch June 3, 2020 21:22
Jorropo pushed a commit to Jorropo/go-libipfs that referenced this pull request Jan 26, 2023
If peer is first to send a block to session, protect connection

This commit was moved from ipfs/go-bitswap@70bced7
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.

2 participants