diff --git a/commands/http/client.go b/commands/http/client.go index 371ca8756..a32974a74 100644 --- a/commands/http/client.go +++ b/commands/http/client.go @@ -150,10 +150,12 @@ func getResponse(httpRes *http.Response, req cmds.Request) (cmds.Response, error for { err := dec.Decode(&v) - if err != nil { - if err != io.EOF { - fmt.Println(err.Error()) - } + if err != nil && err != io.EOF { + fmt.Println(err.Error()) + return + } + if err == io.EOF { + close(outChan) return } outChan <- v