p2p/discover: fix goroutine leak due to blocking on sync.Once

This commit is contained in:
Péter Szilágyi
2015-04-28 10:28:04 +03:00
parent 437cf4b3ac
commit 4992765032
2 changed files with 24 additions and 13 deletions

View File

@ -335,7 +335,7 @@ func (tab *Table) ping(id NodeID, addr *net.UDPAddr) error {
}
// Pong received, update the database and return
tab.db.updateLastPong(id, time.Now())
go tab.db.expirer()
tab.db.ensureExpirer()
return nil
}