🐞 fix(TSG-7599): hos client 初始化失败,定期尝试重连hos服务
This commit is contained in:
@@ -96,14 +96,14 @@ int main(int argc, char *argv[])
|
||||
|
||||
printf("hos_init_instance start ...\n");
|
||||
hos_instance = hos_get_instance();
|
||||
if (hos_instance->result == false)
|
||||
if (hos_instance == NULL)
|
||||
{
|
||||
hos_instance = hos_init_instance(conf_file, module_name, 1, bucket);
|
||||
}
|
||||
if (hos_instance->result == false)
|
||||
if (hos_instance == NULL)
|
||||
{
|
||||
printf("error:hos_init_instance\n");
|
||||
printf("error:%s", hos_instance->error_message);
|
||||
printf("error:[%d]%s", hos_get_init_instance_errorcode, hos_get_init_instance_errormsg);
|
||||
return -1;
|
||||
}
|
||||
printf("hos_init_instance success ... \n");
|
||||
|
||||
@@ -15,7 +15,6 @@ extern "C"
|
||||
#include<sys/stat.h>
|
||||
#include<math.h>
|
||||
#include<netinet/in.h>
|
||||
#include<zlog.h>
|
||||
}
|
||||
#include"../../src/hos_client.h"
|
||||
#include "MESA_handle_logger.h"
|
||||
@@ -474,7 +473,7 @@ int main(int argc, char *argv[])
|
||||
hos_instance hos_instance = hos_init_instance(conf_path, module, thread_sum, bucket);
|
||||
if (hos_instance == NULL)
|
||||
{
|
||||
printf("error:hos_client_handle\n %s\n", hos_instance->error_message);
|
||||
printf("error:hos_client_handle\n error:[%d]%s\n", hos_get_init_instance_errorcode(), hos_get_init_instance_errormsg());
|
||||
fclose(log);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user