diff --git a/alpine/packages/hupper/main.go b/alpine/packages/hupper/main.go index 3048cd8a0..d7e79b73b 100644 --- a/alpine/packages/hupper/main.go +++ b/alpine/packages/hupper/main.go @@ -2,6 +2,7 @@ package main import ( "flag" + "io" "io/ioutil" "log" "os" @@ -38,17 +39,14 @@ func main() { buf := make([]byte, 43) // initial state _, err = watch.Read(buf) - if err != nil { + if err != nil && err != io.EOF { log.Fatalln("Error reading watch file", err) } for { - n, err := watch.Read(buf) - if err != nil { + _, err := watch.Read(buf) + if err != nil && err != io.EOF { log.Fatalln("Error reading watch file", err) } - if n == 0 { - continue - } // a few changes eg debug do not require a daemon restart // however at present we cannot check changes, and most do restart := true