Skip to content

Commit 789c6de

Browse files
johnstcnmafredri
andauthored
avoid blocking on err chan
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
1 parent c1467f0 commit 789c6de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cli/stat.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ func (r *RootCmd) stat() *clibase.Cmd {
4242
var sr statsRow
4343

4444
// Get CPU measurements first.
45-
hostErr := make(chan error)
46-
containerErr := make(chan error)
45+
hostErr := make(chan error, 1)
46+
containerErr := make(chan error, 1)
4747
go func() {
4848
defer close(hostErr)
4949
cs, err := st.HostCPU("")

0 commit comments

Comments
 (0)