Merge pull request #117 from mrd0ll4r/udpsync
udp: have the IV-generating goroutine in the waitgroup
This commit is contained in:
commit
522e874336
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