Skip to content

Commit

Permalink
fix deadlock on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelsq committed Nov 18, 2021
1 parent 6834ad8 commit 88beb99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/wtc/wtc.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,7 @@ func Start(cfg *Config) {
}
contextsLockMutext.Unlock()
}

w.Close()
return
case e := <-w.Event:
if e.IsDir() {
continue
Expand Down Expand Up @@ -323,6 +321,8 @@ func Start(cfg *Config) {
if err := w.Start(time.Millisecond * 100); err != nil {
log.Fatalln(err)
}

<-exit
}

func findFile() ([]byte, error) {
Expand Down

0 comments on commit 88beb99

Please sign in to comment.