Skip to content

Commit

Permalink
log only if can't watch file
Browse files Browse the repository at this point in the history
  • Loading branch information
nbari committed Jul 10, 2017
1 parent d165a27 commit f8d663f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion scandir.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ func (s *ScanDir) Scandir(ctl Control) error {
}
go func() {
if err := WatchFile(path, s.watch); err != nil {
log.Printf("WatchFile error: %s", err)
// try 3 times sleeping i*100ms between retries
for i := int32(100); i <= 300; i += 100 {
time.Sleep(time.Duration(rand.Int31n(i)) * time.Millisecond)
Expand Down

0 comments on commit f8d663f

Please sign in to comment.