Early return after sending to errCh in Options#eventHandler

This commit is contained in:
Ted Yu 2019-08-30 13:18:33 -07:00
parent 1ade4ce269
commit f1b314bf5a

View File

@ -252,6 +252,7 @@ func (o *Options) eventHandler(ent fsnotify.Event) {
if eventOpIs(fsnotify.Write) || eventOpIs(fsnotify.Rename) {
// error out when ConfigFile is updated
o.errCh <- fmt.Errorf("content of the proxy server's configuration file was updated")
return
}
o.errCh <- nil
}