From 771c8c136e964daace17775baaf19e081a918e9e Mon Sep 17 00:00:00 2001 From: Arsen Musayelyan Date: Sat, 28 May 2022 14:58:39 -0700 Subject: [PATCH] fix time.Ticker leak --- lrpc_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/lrpc_test.go b/lrpc_test.go index c7cccf9..72cb76a 100644 --- a/lrpc_test.go +++ b/lrpc_test.go @@ -149,6 +149,7 @@ func (Channel) Time(ctx *server.Context, interval time.Duration) error { case t := <-tick.C: ch <- t case <-ctx.Done(): + tick.Stop() close(ch) return }