From b3e46f5d076559b2c627d45ded3aab0bf1057a9a Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Mon, 19 Feb 2018 17:50:53 +0100 Subject: [PATCH] fix error handling in buf.Copy --- common/buf/copy.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/buf/copy.go b/common/buf/copy.go index 7d19efdda..7d487c174 100644 --- a/common/buf/copy.go +++ b/common/buf/copy.go @@ -92,7 +92,9 @@ func copyInternal(reader Reader, writer Writer, handler *copyHandler) error { buffer.Release() return werr } - } else if err != nil { + } + + if err != nil { return err } }