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

fix bandwidth bug, config item interval to float.

This commit is contained in:
winlin 2014-07-12 22:22:56 +08:00
parent d8ed7cc968
commit 3a1b3dd142
5 changed files with 60 additions and 38 deletions

View file

@ -1866,20 +1866,20 @@ int SrsConfig::get_bw_check_interval_ms(const string &vhost)
SrsConfDirective* conf = get_vhost(vhost);
if (!conf) {
return SRS_CONF_DEFAULT_BANDWIDTH_INTERVAL;
return SRS_CONF_DEFAULT_BANDWIDTH_INTERVAL * 1000;
}
conf = conf->get("bandcheck");
if (!conf) {
return SRS_CONF_DEFAULT_BANDWIDTH_INTERVAL;
return SRS_CONF_DEFAULT_BANDWIDTH_INTERVAL * 1000;
}
conf = conf->get("interval_ms");
conf = conf->get("interval");
if (!conf) {
return SRS_CONF_DEFAULT_BANDWIDTH_INTERVAL;
return SRS_CONF_DEFAULT_BANDWIDTH_INTERVAL * 1000;
}
return ::atoi(conf->arg0().c_str()) * 1000;
return ::atof(conf->arg0().c_str()) * 1000;
}
int SrsConfig::get_bw_check_limit_kbps(const string &vhost)