From 54b441d690f6423b192739759422a2cd236aa1eb Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Mon, 17 Apr 2017 19:33:22 +0200 Subject: [PATCH] simplify error propagation --- common/signal/exec.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/signal/exec.go b/common/signal/exec.go index 2a82c523..3a3400f9 100644 --- a/common/signal/exec.go +++ b/common/signal/exec.go @@ -32,13 +32,13 @@ func ErrorOrFinish2(ctx context.Context, c1, c2 <-chan error) error { select { case <-ctx.Done(): return ctx.Err() - case err, failed := <-c1: - if failed { + case err := <-c1: + if err != nil { return err } return ErrorOrFinish1(ctx, c2) - case err, failed := <-c2: - if failed { + case err := <-c2: + if err != nil { return err } return ErrorOrFinish1(ctx, c1)