git.iko.soy/typeable/oauth2-proxy
on master help sign in
Merge pull request #33 from adamdecaf/watcher-break
787d3daJoel Speed
watcher.go+1−1
@@ -45,7 +45,7 @@ func WatchForUpdates(filename string, done <-chan bool, action func()) {
45 select {
45 select {
46 case _ = <-done:
46 case _ = <-done:
47 log.Printf("Shutting down watcher for: %s", filename)
47 log.Printf("Shutting down watcher for: %s", filename)
48− break
48+ return
49 case event := <-watcher.Events:
49 case event := <-watcher.Events:
50 // On Arch Linux, it appears Chmod events precede Remove events,
50 // On Arch Linux, it appears Chmod events precede Remove events,
51 // which causes a race between action() and the coming Remove event.
51 // which causes a race between action() and the coming Remove event.