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

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