libs3
libs3 copied to clipboard
doult of function should_retry
I read source code of function should_retry:
`static int should_retry() { if (retriesG--) { // Sleep before next retry; start out with a 1 second sleep static int retrySleepInterval = 1 * SLEEP_UNITS_PER_SECOND; sleep(retrySleepInterval); // Next sleep 1 second longer retrySleepInterval++; return 1; }
return 0;
}` in once loop, var retrySleepInerval is reassigned, can retrySleepInterval++ be effective?
retrySleepInterval is a static, so it is only assigned once. I admit that this is not the most beautiful or easiest to understand code.