From bf2d7cb2bdc29bf7b6d9656db44efc598a3719f8 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Sat, 13 Oct 2018 21:22:48 +0100 Subject: [PATCH] fix infinite loop in `stats bw` "break" just breaks from the select, this loops infinitely (fast). License: MIT Signed-off-by: Steven Allen --- core/commands/stat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/commands/stat.go b/core/commands/stat.go index a1081bd54..34b0644f8 100644 --- a/core/commands/stat.go +++ b/core/commands/stat.go @@ -142,7 +142,7 @@ Example: select { case <-time.After(interval): case <-req.Context.Done(): - break + return nil } } },