p2p/discover: fix a race where table loop would self-lookup before returning from constructor
This commit is contained in:
@ -42,6 +42,7 @@ func init() {
|
||||
func newTestTable(t transport) (*Table, *enode.DB) {
|
||||
db, _ := enode.OpenDB("")
|
||||
tab, _ := newTable(t, db, nil, log.Root())
|
||||
go tab.loop()
|
||||
return tab, db
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user