1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Merge branch '3.0release' into 4.0release

This commit is contained in:
winlin 2020-02-18 22:15:29 +08:00
commit 0c48c42f36
6 changed files with 33 additions and 4 deletions

View file

@ -3488,7 +3488,7 @@ srs_error_t SrsConfig::check_normal_config()
&& n != "http_api" && n != "stats" && n != "vhost" && n != "pithy_print_ms"
&& n != "http_server" && n != "stream_caster" && n != "srt_server"
&& n != "utc_time" && n != "work_dir" && n != "asprocess"
&& n != "ff_log_level" && n != "grace_final_wait"
&& n != "ff_log_level" && n != "grace_final_wait" && n != "force_grace_quit"
) {
return srs_error_new(ERROR_SYSTEM_CONFIG_INVALID, "illegal directive %s", n.c_str());
}
@ -4076,6 +4076,18 @@ srs_utime_t SrsConfig::get_grace_final_wait()
return (srs_utime_t)(::atol(conf->arg0().c_str()) * SRS_UTIME_MILLISECONDS);
}
bool SrsConfig::is_force_grace_quit()
{
static bool DEFAULT = false;
SrsConfDirective* conf = root->get("force_grace_quit");
if (!conf || conf->arg0().empty()) {
return DEFAULT;
}
return SRS_CONF_PERFER_FALSE(conf->arg0());
}
vector<SrsConfDirective*> SrsConfig::get_stream_casters()
{
srs_assert(root);