8406: Treat EXIT_TEMPFAIL as EXIT_RETRY_UNLOCKED if we have previously gotten
[arvados.git] / services / datamanager / summary / pull_list.go
index 34149e8562643d9f69d25f65adee2d7bc4476184..aac9aec9716a74c33f5c18a4ec23e2f9b0b8e212 100644 (file)
@@ -183,9 +183,11 @@ func WritePullLists(arvLogger *logger.Logger,
                if arvLogger != nil {
                        // We need a local variable because Update doesn't call our mutator func until later,
                        // when our list variable might have been reused by the next loop iteration.
+                       host := host
+                       listLen := len(list)
                        arvLogger.Update(func(p map[string]interface{}, e map[string]interface{}) {
                                pullListInfo := logger.GetOrCreateMap(p, "pull_list_len")
-                               pullListInfo[host] = len(list)
+                               pullListInfo[host] = listLen
                        })
                }