diff --git a/src/util/taler-exchange-secmod-eddsa.c b/src/util/taler-exchange-secmod-eddsa.c index cd3fc22f1..8f458f5e3 100644 --- a/src/util/taler-exchange-secmod-eddsa.c +++ b/src/util/taler-exchange-secmod-eddsa.c @@ -383,6 +383,8 @@ sign_worker (void *cls) } GNUNET_assert (0 == pthread_mutex_lock (&work_lock)); } + if (! in_shutdown) + break; /* queue is empty, wait for work */ GNUNET_assert (0 == pthread_cond_wait (&work_cond, diff --git a/src/util/taler-exchange-secmod-rsa.c b/src/util/taler-exchange-secmod-rsa.c index 41d78bcf3..27d3d7a96 100644 --- a/src/util/taler-exchange-secmod-rsa.c +++ b/src/util/taler-exchange-secmod-rsa.c @@ -446,6 +446,8 @@ sign_worker (void *cls) } GNUNET_assert (0 == pthread_mutex_lock (&work_lock)); } + if (! in_shutdown) + break; /* queue is empty, wait for work */ GNUNET_assert (0 == pthread_cond_wait (&work_cond,