use same restart logic for EdDSA and RSA

This commit is contained in:
Christian Grothoff 2020-12-31 17:38:41 +01:00
parent ad62f0fb7e
commit 7514407487
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 10 additions and 2 deletions

View File

@ -415,7 +415,7 @@ TALER_CRYPTO_helper_denom_poll (struct TALER_CRYPTO_DenominationHelper *dh)
{ {
/* timeout AND not synced => full reconnect */ /* timeout AND not synced => full reconnect */
GNUNET_log (GNUNET_ERROR_TYPE_INFO, GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Restarting connection to helper, did not come up properly\n"); "Restarting connection to RSA helper, did not come up properly\n");
do_disconnect (dh); do_disconnect (dh);
try_connect (dh); try_connect (dh);
if (-1 == dh->sock) if (-1 == dh->sock)

View File

@ -373,7 +373,15 @@ TALER_CRYPTO_helper_esign_poll (struct TALER_CRYPTO_ExchangeSignHelper *esh)
if (esh->synced) if (esh->synced)
break; break;
if (! await_read_ready (esh)) if (! await_read_ready (esh))
break; /* timeout */ {
/* timeout AND not synced => full reconnect */
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Restarting connection to EdDSA helper, did not come up properly\n");
do_disconnect (dh);
try_connect (dh);
if (-1 == dh->sock)
return; /* give up */
}
continue; /* try again */ continue; /* try again */
} }
GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING,