]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
nts: destroy NTS-KE client right after failed start
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 23 Feb 2023 13:58:29 +0000 (14:58 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 23 Feb 2023 14:01:45 +0000 (15:01 +0100)
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

index 34412a62efb9b9c8ed81e3859637b254fc3113b3..5b9c687b3f1f81d8c7ff6cf1d7d2798324104238 100644 (file)
@@ -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);