fix stuck goroutine

This commit is contained in:
Alex Grintsvayg 2018-08-06 19:52:09 -04:00
parent fad4d7f170
commit 300e1980af

View file

@ -73,6 +73,7 @@ func (dht *DHT) runAnnouncer() {
for {
select {
case <-dht.grp.Ch():
return
case <-maintenance.C:
maxAnnounce := dht.conf.AnnounceRate * int(dht.conf.ReannounceTime.Seconds())