diff options
author | Valery Piashchynski <[email protected]> | 2020-02-23 15:31:45 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-02-23 15:31:45 +0300 |
commit | ee15f84a9b545ba99c8d678f14367e216e9980f2 (patch) | |
tree | 93a42635035057b7b015c9d69d086fd58c1ccbf5 /service/reload | |
parent | 2b70159897b52e99f4040d1fe6571622c1e7459a (diff) |
Fix broken imports
Diffstat (limited to 'service/reload')
-rw-r--r-- | service/reload/service.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/service/reload/service.go b/service/reload/service.go index 832ac185..a8e862cb 100644 --- a/service/reload/service.go +++ b/service/reload/service.go @@ -91,6 +91,9 @@ func (s *Service) Serve() error { service string }, 100) + // use the same interval + ticker := time.NewTicker(s.cfg.Interval) + // drain channel in case of leaved messages defer func() { go func() { @@ -109,12 +112,11 @@ func (s *Service) Serve() error { service string }{serviceConfig: s.cfg.Services[e.service], service: e.service} + ticker.Stop() + ticker = time.NewTicker(s.cfg.Interval) } }() - // use the same interval - ticker := time.NewTicker(s.cfg.Interval) - // map with configs by services updated := make(map[string]ServiceConfig, 100) |