p2p/discover: unlock the table during ping replacement

Table.mutex was being held while waiting for a reply packet, which
effectively made many parts of the whole stack block on that packet,
including the net_peerCount RPC call.
This commit is contained in:
Felix Lange
2015-08-07 00:10:26 +02:00
parent 698e98d981
commit 01ed3fa1a9
3 changed files with 77 additions and 52 deletions

View File

@ -167,7 +167,7 @@ func TestUDP_findnode(t *testing.T) {
for i := 0; i < bucketSize; i++ {
nodes.push(nodeAtDistance(test.table.self.sha, i+2), bucketSize)
}
test.table.add(nodes.entries)
test.table.stuff(nodes.entries)
// ensure there's a bond with the test node,
// findnode won't be accepted otherwise.