summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--internal/db/bundb/list.go1
-rw-r--r--internal/timeline/manager.go1
2 files changed, 2 insertions, 0 deletions
diff --git a/internal/db/bundb/list.go b/internal/db/bundb/list.go
index ad970f539..5cf10ce3c 100644
--- a/internal/db/bundb/list.go
+++ b/internal/db/bundb/list.go
@@ -429,6 +429,7 @@ func (l *listDB) PutListEntries(ctx context.Context, entries []*gtsmodel.ListEnt
// Finally, insert each list entry into the database.
return l.db.RunInTx(ctx, func(tx bun.Tx) error {
for _, entry := range entries {
+ entry := entry // rescope
if err := l.state.Caches.GTS.ListEntry().Store(entry, func() error {
_, err := tx.
NewInsert().
diff --git a/internal/timeline/manager.go b/internal/timeline/manager.go
index 23b769c62..df0323cdb 100644
--- a/internal/timeline/manager.go
+++ b/internal/timeline/manager.go
@@ -119,6 +119,7 @@ func (m *manager) Start() error {
// hasn't been accessed in the last hour.
go func() {
for now := range time.NewTicker(1 * time.Hour).C {
+ now := now // rescope
// Define the range function inside here,
// so that we can use the 'now' returned
// by the ticker, instead of having to call