forked from TrueCloudLab/neoneo-go
network: fix logging data race in the package
Nested goroutines could cause logging race. Close #3316 Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
This commit is contained in:
parent
7e12cc11e4
commit
31548dc28f
1 changed files with 1 additions and 10 deletions
|
@ -335,16 +335,7 @@ func TestServerNotSendsVerack(t *testing.T) {
|
|||
p2 = newLocalPeer(t, s)
|
||||
)
|
||||
s.id = 1
|
||||
finished := make(chan struct{})
|
||||
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
|
||||
})
|
||||
startWithCleanup(t, s)
|
||||
|
||||
na, _ := net.ResolveTCPAddr("tcp", "0.0.0.0:3000")
|
||||
p.netaddr = *na
|
||||
|
|
Loading…
Reference in a new issue