mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 15:16:41 +08:00
ensure Loop() is started before feeding refresh chan
This commit is contained in:
@@ -31,8 +31,8 @@ func NewDockerContainerSource() *DockerContainerSource {
|
|||||||
containers: make(map[string]*Container),
|
containers: make(map[string]*Container),
|
||||||
needsRefresh: make(chan string, 60),
|
needsRefresh: make(chan string, 60),
|
||||||
}
|
}
|
||||||
cm.refreshAll()
|
|
||||||
go cm.Loop()
|
go cm.Loop()
|
||||||
|
cm.refreshAll()
|
||||||
go cm.watchEvents()
|
go cm.watchEvents()
|
||||||
return cm
|
return cm
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user