skanehira/docui

[Bug] Stop get resource list on goroutine when attach container .

skanehira opened this issue · 0 comments

Using goroutine to get resource list when init panels.
However, goroutine doesn't stop when attach container.

It need to stop goroutine before attach container.

//  monitoring container status interval 5s
go func() {
	for {
		i.Update(func(g *gocui.Gui) error {
			return i.Refresh(g, v)
		})
		time.Sleep(5 * time.Second)
	}
}()

reference article:
https://blog.y-yuki.net/entry/2017/04/29/000000
https://qiita.com/castaneai/items/7815f3563b256ae9b18d