@cryptotaxi247 / netdata-1 / commits / cefed5f4d

add exit points to ACLK-NG (#11751)

Timotej S committed Nov 5, 2021 at 19:26 UTC cefed5f4dddc4466a5448632a778f081087f540a
1 file changed +4 -1
aclk/aclk.c
+4 -1
@@ -510,7 +510,7 @@ static int aclk_block_till_recon_allowed() {
510 sleep_usec(recon_delay * USEC_PER_MS);
511 recon_delay = 0;
512 }
513 - return 0;
513 + return netdata_exit;
514 }
515
516 #ifndef ACLK_DISABLE_CHALLENGE
@@ -603,6 +603,9 @@ static int aclk_attempt_to_connect(mqtt_wss_client client)
603 continue;
604 }
605
606 + if (netdata_exit)
607 + return 1;
608 +
609 memset(&auth_url, 0, sizeof(url_t));
610 if (url_parse(aclk_env->auth_endpoint, &auth_url)) {
611 error("Parsing URL returned by env endpoint for authentication failed. \"%s\"", aclk_env->auth_endpoint);