Skip to content

Commit

Permalink
ask for more peers on start
Browse files Browse the repository at this point in the history
  • Loading branch information
cenkalti committed Nov 7, 2019
1 parent 6147937 commit 6a47d26
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/announcer/dht.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ func NewDHTAnnouncer() *DHTAnnouncer {
needMorePeersC: make(chan bool),
closeC: make(chan struct{}),
doneC: make(chan struct{}),
needMorePeers: true,
}
}

Expand All @@ -42,7 +43,7 @@ func (a *DHTAnnouncer) NeedMorePeers(val bool) {
func (a *DHTAnnouncer) Run(announceFunc func(), interval, minInterval time.Duration, l logger.Logger) {
defer close(a.doneC)

timer := time.NewTimer(interval)
timer := time.NewTimer(minInterval)
defer timer.Stop()

resetTimer := func() {
Expand Down

0 comments on commit 6a47d26

Please sign in to comment.