Skip to content

Commit

Permalink
use buffered channel (#4197)
Browse files Browse the repository at this point in the history
  • Loading branch information
envestcc committed Mar 22, 2024
1 parent a3176c1 commit cd8497c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actpool/actpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ func (ap *actPool) context(ctx context.Context) context.Context {
}

func (ap *actPool) enqueue(ctx context.Context, act *action.SealedEnvelope, replace bool) error {
var errChan = make(chan error) // unused errChan will be garbage-collected
var errChan = make(chan error, 1) // unused errChan will be garbage-collected
ap.jobQueue[ap.allocatedWorker(act.SenderAddress())] <- workerJob{
ctx,
act,
Expand Down

0 comments on commit cd8497c

Please sign in to comment.