Skip to content

Commit

Permalink
fix: removed depth check for skip list
Browse files Browse the repository at this point in the history
  • Loading branch information
istae committed Jul 6, 2021
1 parent 3a83603 commit 4a7382e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/pushsync/pushsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ func (ps *PushSync) pushToClosest(ctx context.Context, ch swarm.Chunk, retryAllo
ps.metrics.TotalFailedSendAttempts.Inc()

// if the node has warmed up AND no other closer peer has been tried
if time.Now().After(ps.warmupPeriod) && !ps.skipList.HasChunk(ch.Address()) && ps.topologyDriver.IsWithinDepth(ch.Address()) {
if time.Now().After(ps.warmupPeriod) && !ps.skipList.HasChunk(ch.Address()) {
ps.skipList.Add(peer, ch.Address(), skipPeerExpiration)
}
}
Expand Down

0 comments on commit 4a7382e

Please sign in to comment.