udp: have the IV-generating goroutine in the waitgroup
This commit is contained in:
parent
91c1649614
commit
8e13f8fbe3
1 changed files with 2 additions and 0 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue