Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
remove unnecessary select
  • Loading branch information
9072997 committed Aug 29, 2021
commit 160011c5ce0e02c8772056940a8868bf65c05795
6 changes: 2 additions & 4 deletions hosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,8 @@ func watchHostsChanges(filename string, fn func()) error {
watcher.Add(filename)

for {
select {
case <-watcher.Events:
fn()
}
<-watcher.Events
fn()
}
}

Expand Down