From 8e13f8fbe3d78acc3de2c65aaf80a7f2793cb33e Mon Sep 17 00:00:00 2001 From: Leo Balduf Date: Fri, 30 Oct 2015 20:29:38 +0100 Subject: [PATCH] udp: have the IV-generating goroutine in the waitgroup --- udp/udp.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/udp/udp.go b/udp/udp.go index a046574..9920911 100644 --- a/udp/udp.go +++ b/udp/udp.go @@ -104,7 +104,9 @@ func (s *Server) serve() error { func (s *Server) Serve() { glog.V(0).Info("Starting UDP on ", s.config.UDPConfig.ListenAddr) + s.wg.Add(1) go func() { + defer s.wg.Done() // Generate a new IV every hour. t := time.NewTicker(time.Hour) for {