aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/server_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/server_test.go')
-rw-r--r--p2p/server_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/p2p/server_test.go b/p2p/server_test.go
index 01448cc7b..e8d21a188 100644
--- a/p2p/server_test.go
+++ b/p2p/server_test.go
@@ -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 {