From 92d5d19ce955f407caf8f6f55c644e8b52676dd6 Mon Sep 17 00:00:00 2001 From: caoming Date: Fri, 22 Mar 2019 10:18:00 +0800 Subject: [PATCH] raft: more precise that rename res to err. --- raft/node.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/raft/node.go b/raft/node.go index 749db98758b..2ec2c3a64bd 100644 --- a/raft/node.go +++ b/raft/node.go @@ -504,9 +504,9 @@ func (n *node) stepWithWaitOption(ctx context.Context, m pb.Message, wait bool) return ErrStopped } select { - case rsp := <-pm.result: - if rsp != nil { - return rsp + case err := <-pm.result: + if err != nil { + return err } case <-ctx.Done(): return ctx.Err()