check run before closing the channel
This commit is contained in:
parent
385c762ddd
commit
75f1289b5e
|
@ -126,8 +126,10 @@ func (p *Project) watching() {
|
|||
log.Println(pname(p.Name, 4), ":", Magenta(event.Name[:i]))
|
||||
|
||||
// stop and run again
|
||||
close(channel)
|
||||
wr.Wait()
|
||||
if p.Run {
|
||||
close(channel)
|
||||
wr.Wait()
|
||||
}
|
||||
go routines(p, channel, &wr)
|
||||
p.reload = time.Now().Truncate(time.Second)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue