Просмотр исходного кода

Close channel after the client is stopped

Audrius Butkevicius 10 лет назад
Родитель
Сommit
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++ {