From 73236e58c57dfa1c81825f74bf271508f5437468 Mon Sep 17 00:00:00 2001 From: Audrius Butkevicius Date: Thu, 22 Oct 2015 23:09:02 +0100 Subject: [PATCH] Close channel after the client is stopped --- lib/relay/client/methods.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/relay/client/methods.go b/lib/relay/client/methods.go index 546e8279b..c4984e36f 100644 --- a/lib/relay/client/methods.go +++ b/lib/relay/client/methods.go @@ -109,8 +109,8 @@ func TestRelay(uri *url.URL, certs []tls.Certificate, sleep time.Duration, times } go c.Serve() defer func() { - close(invs) c.Stop() + close(invs) }() for i := 0; i < times; i++ {