From c57ea2d65b05c60a4e3e42f1523d4f7c8b93ec98 Mon Sep 17 00:00:00 2001 From: GongWilliam <42128779+GongWilliam@users.noreply.github.com> Date: Wed, 27 Sep 2023 06:37:47 +0000 Subject: [PATCH] remove unnecessary variable in stepWithWaitOption Signed-off-by: GongWilliam <42128779+GongWilliam@users.noreply.github.com> --- node.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/node.go b/node.go index fe8f8dee..021adcf8 100644 --- a/node.go +++ b/node.go @@ -516,13 +516,12 @@ func (n *node) stepWithWaitOption(ctx context.Context, m pb.Message, wait bool) return ErrStopped } } - ch := n.propc pm := msgWithResult{m: m} if wait { pm.result = make(chan error, 1) } select { - case ch <- pm: + case n.propc <- pm: if !wait { return nil }