server: prevent double channel close

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca 2018-03-02 13:43:09 +01:00
parent 0b736bb43f
commit 1b86b57b07
No known key found for this signature in database
GPG key ID: B2BEAD150DE936B9

View file

@ -389,7 +389,6 @@ func (s *Server) StartHooksMonitor() {
}
case err := <-watcher.Errors:
logrus.Debugf("watch error: %v", err)
close(done)
return
case <-s.monitorsChan:
logrus.Debug("closing hooks monitor...")
@ -448,7 +447,6 @@ func (s *Server) StartExitMonitor() {
}
case err := <-watcher.Errors:
logrus.Debugf("watch error: %v", err)
close(done)
return
case <-s.monitorsChan:
logrus.Debug("closing exit monitor...")