mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 03:41:55 +00:00
refine reload, ignore if parse config file failed.
This commit is contained in:
parent
cfee761899
commit
aa784377fd
1 changed files with 3 additions and 4 deletions
|
@ -477,13 +477,12 @@ int SrsConfig::reload()
|
|||
|
||||
SrsConfig conf;
|
||||
if ((ret = conf.parse_file(config_file.c_str())) != ERROR_SUCCESS) {
|
||||
srs_error("config reloader parse file failed. ret=%d", ret);
|
||||
srs_error("ignore config reloader parse file failed. ret=%d", ret);
|
||||
ret = ERROR_SUCCESS;
|
||||
return ret;
|
||||
}
|
||||
srs_info("config reloader parse file success.");
|
||||
|
||||
// store current root to old_root,
|
||||
// and reap the root from conf to current root.
|
||||
SrsConfDirective* old_root = root;
|
||||
SrsAutoFree(SrsConfDirective, old_root, false);
|
||||
|
||||
|
@ -792,7 +791,7 @@ int SrsConfig::reload_vhost(SrsConfDirective* old_root)
|
|||
|
||||
// ENABLED => ENABLED (modified)
|
||||
if (get_vhost_enabled(new_vhost) && get_vhost_enabled(old_vhost)) {
|
||||
srs_trace("vhost %s modified, reload its detail.", vhost.c_str());
|
||||
srs_trace("vhost %s maybe modified, reload its detail.", vhost.c_str());
|
||||
// atc, only one per vhost
|
||||
if (!srs_directive_equals(new_vhost->get("atc"), old_vhost->get("atc"))) {
|
||||
for (it = subscribes.begin(); it != subscribes.end(); ++it) {
|
||||
|
|
Loading…
Reference in a new issue