Merge pull request #1405 from runcom/closed-channel

server: prevent double channel close
This commit is contained in:
Mrunal Patel 2018-03-02 09:44:56 -08:00 committed by GitHub
commit 66d3ab890f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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