Merge pull request #117 from mrd0ll4r/udpsync

udp: have the IV-generating goroutine in the waitgroup
This commit is contained in:
Jimmy Zelinskie 2015-10-30 15:36:31 -04:00
commit 522e874336

View file

@ -104,7 +104,9 @@ func (s *Server) serve() error {
func (s *Server) Serve() { func (s *Server) Serve() {
glog.V(0).Info("Starting UDP on ", s.config.UDPConfig.ListenAddr) glog.V(0).Info("Starting UDP on ", s.config.UDPConfig.ListenAddr)
s.wg.Add(1)
go func() { go func() {
defer s.wg.Done()
// Generate a new IV every hour. // Generate a new IV every hour.
t := time.NewTicker(time.Hour) t := time.NewTicker(time.Hour)
for { for {