Skip to content

Commit

Permalink
Fixed comment during refactoring (#6108)
Browse files Browse the repository at this point in the history
Also renamed variable as `r` looks too short and stands more for reader
or ref rather than response/result.
  • Loading branch information
dkrotx authored Jun 6, 2024
1 parent b9018bf commit b25960e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions service/matching/tasklist/task_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ writerLoop:
maxReadLevel = taskIDs[i]
}

r, err := w.db.CreateTasks(tasks)
resp, err := w.db.CreateTasks(tasks)
err = w.handleErr(err)
if err != nil {
w.logger.Error("Persistent store operation failure",
Expand All @@ -241,12 +241,11 @@ writerLoop:
atomic.StoreInt64(&w.maxReadLevel, maxReadLevel)
}

w.sendWriteResponse(reqs, err, r)
w.sendWriteResponse(reqs, err, resp)
}
case <-w.stopCh:
// we don't close the appendCh here
// because that can cause on a send on closed
// channel panic on the appendTask()
// because that can cause "send on closed channel" panic on the appendTask()
break writerLoop
}
}
Expand Down

0 comments on commit b25960e

Please sign in to comment.