fix: initialize channel before the ticker

This commit is contained in:
Dan Anglin 2020-01-19 21:30:29 +00:00
parent c8a1d0adfa
commit 1be999c8b6
No known key found for this signature in database
GPG key ID: 7AC2B18EC1D09F27

View file

@ -74,9 +74,9 @@ func NewPominal(w, s, l float64, m int) Pominal {
// Run Pominal // Run Pominal
func (p *Pominal) Run(infoUI, timerUI *tview.TextView) { func (p *Pominal) Run(infoUI, timerUI *tview.TextView) {
p.stopChan = make(chan struct{})
p.UpdateSession(infoUI) p.UpdateSession(infoUI)
t := time.NewTicker(1 * time.Second) t := time.NewTicker(1 * time.Second)
p.stopChan = make(chan struct{})
infinite: infinite:
for { for {