Max. retry intervall for files must not exceed max_retry

This commit is contained in:
wbaumann
2009-06-12 08:45:33 +00:00
parent d3b5b34109
commit 3a1840fa65
2 changed files with 6 additions and 1 deletions

View File

@ -311,7 +311,8 @@ set_next_upload_attempt(dav_node *node)
item->attempts++;
if (item->attempts > MAX_UPLOAD_ATTEMPTS)
return -1;
item->save_at += item->attempts * min_retry;
time_t delay = item->attempts * min_retry;
item->save_at += (delay > max_retry) ? max_retry : delay;
return 0;
}