Revert "Improved ACLK reconnection sequence (#8708)" (#8728)
This reverts commit 853b23745e7df2f163df1c0213c9de52394de36b.
cosmix committed
Apr 15, 2020 at 21:47 UTC
3ce7fdc7197a555e608af9dbd146a1425b06748a
1 file changed
+1
-3
aclk/agent_cloud_link.c
+1
-3
@@ -1257,11 +1257,11 @@ static void aclk_try_to_connect(char *hostname, char *port, int port_num)
1257
if (aclk_password == NULL)
1258
return;
1259
int rc;
1260
- aclk_connecting = 1;
1260
rc = mqtt_attempt_connection(hostname, port_num, aclk_username, aclk_password);
1261
if (unlikely(rc)) {
1262
error("Failed to initialize the agent cloud link library");
1263
}
1264
+ aclk_connecting = 1;
1265
}
1266
1267
@@ -1355,8 +1355,6 @@ void *aclk_main(void *ptr)
1355
}
1356
1357
_link_event_loop();
1358
- if (unlikely(!aclk_connected))
1359
- continue;
1358
/*static int stress_counter = 0;
1359
if (write_q_bytes==0 && stress_counter ++ >5)
1360
{