Skip to content

Commit

Permalink
remove unnecessary variable in stepWithWaitOption
Browse files Browse the repository at this point in the history
  • Loading branch information
heymingwei committed Sep 27, 2023
1 parent 645ea12 commit e63578f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit e63578f

Please sign in to comment.