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

Commit

Permalink
adjust relay scheduler delays
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzo committed Apr 17, 2019
1 parent 06af07d commit e55ea43
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions swarm_dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,9 @@ func (s *Swarm) emitDialAddrs(ctx context.Context, ch chan ma.Multiaddr, immedia
var delay time.Duration
if len(immediate) > 0 {
if isPublic {
delay = 500 * time.Millisecond
delay = 1000 * time.Millisecond
} else {
delay = 50 * time.Millisecond
delay = 250 * time.Millisecond
}
}

Expand All @@ -452,7 +452,7 @@ func (s *Swarm) emitDialAddrs(ctx context.Context, ch chan ma.Multiaddr, immedia
}

if len(unknown) > 0 || i < len(connected)-1 {
delay = 500 * time.Millisecond
delay = 1500 * time.Millisecond
} else {
delay = 0
}
Expand All @@ -478,7 +478,7 @@ func (s *Swarm) emitDialAddrs(ctx context.Context, ch chan ma.Multiaddr, immedia
}

if i < len(unknown)-1 {
delay = 750 * time.Millisecond
delay = 2000 * time.Millisecond
} else {
delay = 0
}
Expand Down

0 comments on commit e55ea43

Please sign in to comment.