4 ms·
What about this? unsigned retry_count = 5; do { err = action (); } while (err && is_transient_error (err) && retry_count-- && (sleep (), T
by 1718627440 1y ago
What about this?
unsigned retry_count = 5;
do {
err = action ();
} while (err && is_transient_error (err) && retry_count-- && (sleep (), TRUE))
return err;
We want to loop while there is still an error, the error is still transient, we still haven't retried enough and after we have slept. Pretty straightforward translation of natural language to code.