udp: have the IV-generating goroutine in the waitgroup

This commit is contained in:
Leo Balduf 2015-10-30 20:29:38 +01:00
parent 91c1649614
commit 8e13f8fbe3

View file

@ -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 {