fix stuck goroutine

This commit is contained in:
Alex Grintsvayg 2018-08-06 19:52:09 -04:00
parent 38eaa17a9b
commit f701b78160

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())