瀏覽代碼

Close channel after the client is stopped

Audrius Butkevicius 10 年之前
父節點
當前提交
73236e58c5
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/relay/client/methods.go

+ 1 - 1
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++ {