Commit 1cbbfbe7 authored by Péter Szilágyi's avatar Péter Szilágyi

p2p: fix a close race in the dial test

parent 7e58949c
......@@ -117,7 +117,6 @@ func TestServerDial(t *testing.T) {
t.Error("accept error:", err)
return
}
conn.Close()
accepted <- conn
}()
......@@ -134,6 +133,8 @@ func TestServerDial(t *testing.T) {
select {
case conn := <-accepted:
defer conn.Close()
select {
case peer := <-connected:
if peer.ID() != remid {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment