good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit a0b81097 authored by Péter Szilágyi's avatar Péter Szilágyi Committed by GitHub
Browse files

Merge pull request #19562 from holiman/fix_tabcrash

p2p/discover: fix nil-dereference due to race
parents ec2131c8 95263914
No related branches found
No related tags found
No related merge requests found
......@@ -119,7 +119,6 @@ func newTable(t transport, db *enode.DB, bootnodes []*enode.Node, log log.Logger
tab.seedRand()
tab.loadSeedNodes()
go tab.loop()
return tab, nil
}
......
......@@ -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
}
......
......@@ -253,6 +253,7 @@ func ListenV4(c UDPConn, ln *enode.LocalNode, cfg Config) (*UDPv4, error) {
return nil, err
}
t.tab = tab
go tab.loop()
t.wg.Add(2)
go t.loop()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment