From a1406eded39e3f607f5fbc5fa3a5f8720a1e5bc1 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Thu, 23 Feb 2023 14:58:29 +0100 Subject: [PATCH] nts: destroy NTS-KE client right after failed start When NKC_Start() fails (e.g. due to unreachable network), don't wait for the next poll to destroy the client and another poll to create and start it again. --- nts_ntp_client.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nts_ntp_client.c b/nts_ntp_client.c index 34412a6..5b9c687 100644 --- a/nts_ntp_client.c +++ b/nts_ntp_client.c @@ -239,10 +239,9 @@ get_cookies(NNC_Instance inst) inst->nke = NKC_CreateInstance(&inst->nts_address, inst->name, inst->cert_set); inst->nke_attempts++; - update_next_nke_attempt(inst, now); if (!NKC_Start(inst->nke)) - return 0; + ; } update_next_nke_attempt(inst, now);