Merge pull request #3364 from nspcc-dev/fuzz

network: fix logging data race in the package
This commit is contained in:
Anna Shaleva 2024-03-21 19:52:33 +03:00 committed by GitHub
commit b028c772f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -335,16 +335,7 @@ func TestServerNotSendsVerack(t *testing.T) {
p2 = newLocalPeer(t, s) p2 = newLocalPeer(t, s)
) )
s.id = 1 s.id = 1
finished := make(chan struct{}) startWithCleanup(t, s)
go func() {
go s.run()
close(finished)
}()
t.Cleanup(func() {
// close via quit as server was started via `run()`, not `Start()`
close(s.quit)
<-finished
})
na, _ := net.ResolveTCPAddr("tcp", "0.0.0.0:3000") na, _ := net.ResolveTCPAddr("tcp", "0.0.0.0:3000")
p.netaddr = *na p.netaddr = *na