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]))
|
log.Println(pname(p.Name, 4), ":", Magenta(event.Name[:i]))
|
||||||
|
|
||||||
// stop and run again
|
// stop and run again
|
||||||
|
if p.Run {
|
||||||
close(channel)
|
close(channel)
|
||||||
wr.Wait()
|
wr.Wait()
|
||||||
|
}
|
||||||
go routines(p, channel, &wr)
|
go routines(p, channel, &wr)
|
||||||
p.reload = time.Now().Truncate(time.Second)
|
p.reload = time.Now().Truncate(time.Second)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue