forked from cerc-io/plugeth
p2p: add channel buffers to avoid goroutine leaks in tests (#24929)
This commit is contained in:
@@ -313,7 +313,7 @@ func TestUDPv4_findnodeMultiReply(t *testing.T) {
|
||||
test.table.db.UpdateLastPingReceived(rid, test.remoteaddr.IP, time.Now())
|
||||
|
||||
// queue a pending findnode request
|
||||
resultc, errc := make(chan []*node), make(chan error)
|
||||
resultc, errc := make(chan []*node, 1), make(chan error, 1)
|
||||
go func() {
|
||||
rid := encodePubkey(&test.remotekey.PublicKey).id()
|
||||
ns, err := test.udp.findnode(rid, test.remoteaddr, testTarget)
|
||||
|
||||
Reference in New Issue
Block a user