From d889ab3022313b46e00c52c930998fba5a746489 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 17 Feb 2022 18:41:49 +0300 Subject: [PATCH] [#131] client: Remove redundant `else` branch Signed-off-by: Leonard Lyubich --- client/object_get.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/client/object_get.go b/client/object_get.go index 46b3374f..0c68b18c 100644 --- a/client/object_get.go +++ b/client/object_get.go @@ -124,9 +124,7 @@ func handleSplitInfo(ctx *contextCall, i *v2object.SplitInfo) { // ReadHeader reads header of the object. Result means success. // Failure reason can be received via Close. func (x *ObjectReader) ReadHeader(dst *object.Object) bool { - if !x.ctxCall.writeRequest() { - return false - } else if !x.ctxCall.readResponse() { + if !x.ctxCall.writeRequest() || !x.ctxCall.readResponse() { return false }