Skip to content

Commit

Permalink
simplify retry_later logic
Browse files Browse the repository at this point in the history
  • Loading branch information
lwshang committed Jan 16, 2025
1 parent a481e62 commit 4d828c3
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions ic-cdk-timers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,7 @@ extern "C" fn global_timer() {
let task_id = timer.task;
if let Err(e) = res {
ic_cdk::println!("[ic-cdk-timers] canister_global_timer: {e:?}");
let mut retry_later = false;
if e.reject_code == RejectCode::SysTransient {
retry_later = true;
}
if retry_later {
// Try to execute the timer again later.
TIMERS.with(|timers| {
timers.borrow_mut().push(timer);
Expand Down

0 comments on commit 4d828c3

Please sign in to comment.