From f0e07abcce20525fd0fcbaba006275cc3f50d3f2 Mon Sep 17 00:00:00 2001 From: xtaci Date: Wed, 8 May 2019 21:53:41 +0800 Subject: [PATCH] close opened conns in tests --- sess_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sess_test.go b/sess_test.go index 846cc75..914a0b3 100644 --- a/sess_test.go +++ b/sess_test.go @@ -398,6 +398,7 @@ func parallel_client(wg *sync.WaitGroup, port int) (err error) { } err = echo_tester(cli, 64, 64) + cli.Close() wg.Done() return } @@ -433,6 +434,7 @@ func speedclient(b *testing.B, nbytes int) { b.Fail() } b.SetBytes(int64(nbytes)) + cli.Close() } func BenchmarkSinkSpeed4K(b *testing.B) { @@ -464,6 +466,7 @@ func sinkclient(b *testing.B, nbytes int) { sink_tester(cli, nbytes, b.N) b.SetBytes(int64(nbytes)) + cli.Close() } func echo_tester(cli net.Conn, msglen, msgcount int) error {