MXS-1156: Store master_heartbeat_period in master.ini
MXS-1156: Store master_heartbeat_period in master.ini
This commit is contained in:
@ -2817,6 +2817,11 @@ blr_handle_config_item(const char *name, const char *value, ROUTER_INSTANCE *ins
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Connect options */
|
||||
else if (strcmp(name, "master_heartbeat_period") == 0)
|
||||
{
|
||||
inst->heartbeat = atol((char*)value);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
|
||||
@ -3167,6 +3167,9 @@ blr_file_write_master_config(ROUTER_INSTANCE *router, char *error)
|
||||
fprintf(config_file, "master_tls_version=%s\n", ssl_version);
|
||||
}
|
||||
|
||||
/* Connect options */
|
||||
fprintf(config_file, "master_heartbeat_period=%lu\n", router->heartbeat);
|
||||
|
||||
fclose(config_file);
|
||||
|
||||
/* rename tmp file to right filename */
|
||||
|
||||
@ -4711,6 +4711,8 @@ blr_master_apply_config(ROUTER_INSTANCE *router, MASTER_SERVER_CFG *prev_master)
|
||||
MXS_FREE(router->fileroot);
|
||||
router->fileroot = MXS_STRDUP_A(prev_master->filestem);
|
||||
}
|
||||
|
||||
router->heartbeat = prev_master->heartbeat;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user