summaryrefslogtreecommitdiff
path: root/src/util/taler-helper-crypto-eddsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/taler-helper-crypto-eddsa.c')
-rw-r--r--src/util/taler-helper-crypto-eddsa.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/util/taler-helper-crypto-eddsa.c b/src/util/taler-helper-crypto-eddsa.c
index af1cc24d6..71a34fa2f 100644
--- a/src/util/taler-helper-crypto-eddsa.c
+++ b/src/util/taler-helper-crypto-eddsa.c
@@ -879,9 +879,28 @@ read_job (void *cls)
key))
{
/* client died, skip the rest */
+ client = NULL;
break;
}
}
+ if (NULL != client)
+ {
+ struct GNUNET_MessageHeader synced = {
+ .type = htons (TALER_HELPER_EDDSA_SYNCED),
+ .size = htons (sizeof (synced))
+ };
+
+ if (GNUNET_OK !=
+ transmit (&client->addr,
+ client->addr_size,
+ &synced))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Client %s must have disconnected\n",
+ client->addr.sun_path);
+ free_client (client);
+ }
+ }
}
break;
case TALER_HELPER_EDDSA_MT_REQ_SIGN:
@@ -1532,10 +1551,12 @@ run (void *cls,
unix_sock,
&read_job,
NULL);
-
- /* start job to keep keys up-to-date */
- keygen_task = GNUNET_SCHEDULER_add_now (&update_keys,
- NULL);
+ /* start job to keep keys up-to-date; MUST be run before the #read_task,
+ hence with priority. */
+ keygen_task = GNUNET_SCHEDULER_add_with_priority (
+ GNUNET_SCHEDULER_PRIORITY_URGENT,
+ &update_keys,
+ NULL);
/* start job to handle completed work */
{