When register device server failured, Retry registerd

This commit is contained in:
HuangXin 2019-01-16 16:45:51 +08:00
parent 151664b1a5
commit b95f4d3f26
1 changed files with 5 additions and 1 deletions

View File

@ -83,9 +83,13 @@ int main(int argc, char* argv[])
enice_config_init(); enice_config_init();
if(!hal_is_device_registed()) rc = 0;
while(!hal_is_device_registed())
{ {
LOG_EX(LOG_Debug, "Try Register Device %d times\n", rc++);
device_register(); device_register();
sleep(5);
} }
mqtt_proxy_setup(); mqtt_proxy_setup();