Skip to content

Commit b2559e4

Browse files
authored
fix: use wrong unit (#5830)
1 parent 6b120b8 commit b2559e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

engine/cdn/unit_handler.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@ func (s *Service) postAdminResyncBackendWithDatabaseHandler() service.Handler {
125125

126126
for _, u := range s.Units.Buffers {
127127
if u.ID() == unitID {
128+
choosenUnit := u
128129
s.GoRoutines.Exec(context.Background(), "ResyncWithDB-"+unitID, func(ctx context.Context) {
129-
u.ResyncWithDatabase(ctx, s.mustDBWithCtx(ctx), it, dryRun)
130+
choosenUnit.ResyncWithDatabase(ctx, s.mustDBWithCtx(ctx), it, dryRun)
130131
})
131132
}
132133
}

0 commit comments

Comments
 (0)