Skip to content

Commit deecef9

Browse files
committed
dialqueue: rename local var for clarity.
1 parent 51b1627 commit deecef9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

dial_queue.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func newDialQueue(params *dqParams) (*dialQueue, error) {
117117
// we need a dedicated context for the out queue, in order to control its lifecycle explicitly
118118
// because it cannot be stopped before all workers have yielded, or else we can block forever.
119119
outCtx, outCancelFn := context.WithCancel(context.Background())
120-
sq := &dialQueue{
120+
dq := &dialQueue{
121121
dqParams: params,
122122
nWorkers: params.config.minParallelism,
123123
out: queue.NewChanQueue(outCtx, queue.NewXORDistancePQ(params.target)),
@@ -129,12 +129,12 @@ func newDialQueue(params *dqParams) (*dialQueue, error) {
129129
}
130130

131131
for i := 0; i < int(params.config.minParallelism); i++ {
132-
sq.workerWg.Add(1)
133-
go sq.worker()
132+
dq.workerWg.Add(1)
133+
go dq.worker()
134134
}
135135

136-
go sq.control()
137-
return sq, nil
136+
go dq.control()
137+
return dq, nil
138138
}
139139

140140
func (dq *dialQueue) control() {

0 commit comments

Comments
 (0)