diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-03-28 11:37:21 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-03-28 11:37:21 +0100 |
commit | 9af016d3f2b1fa2f28b853f399bca101bdfb9a6f (patch) | |
tree | 95af1860eca07ee6739312e5deb660ebf3a95970 /src | |
parent | 2ce97d4314100adc26bf7f6e4db2d96ccd58532d (diff) |
-fix non-termination issue for taler-merchant-depositccheck
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/taler-merchant-depositcheck.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/backend/taler-merchant-depositcheck.c b/src/backend/taler-merchant-depositcheck.c index af2fa267..9245e1fb 100644 --- a/src/backend/taler-merchant-depositcheck.c +++ b/src/backend/taler-merchant-depositcheck.c @@ -391,9 +391,9 @@ run_at (struct GNUNET_TIME_Absolute deadline) GNUNET_TIME_absolute2s (deadline)); return; /* too early */ } + next_deadline = deadline; if (NULL != task) GNUNET_SCHEDULER_cancel (task); - next_deadline = deadline; task = GNUNET_SCHEDULER_add_at (deadline, &select_work, NULL); @@ -567,8 +567,12 @@ deposit_get_cb (void *cls, GNUNET_assert (NULL != keys); if ( (w_count < CONCURRENCY_LIMIT / 2) || (0 == w_count) ) + { + if (NULL != task) + GNUNET_SCHEDULER_cancel (task); task = GNUNET_SCHEDULER_add_now (&select_work, NULL); + } } @@ -774,6 +778,8 @@ keys_cb ( return; } keys = TALER_EXCHANGE_keys_incref (in_keys); + if (NULL != task) + GNUNET_SCHEDULER_cancel (task); task = GNUNET_SCHEDULER_add_now (&select_work, NULL); } |