mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine get_publish_1stpkt_timeout in time unit
This commit is contained in:
parent
d6828a3e58
commit
170872135d
13 changed files with 46 additions and 40 deletions
|
@ -4774,10 +4774,10 @@ bool SrsConfig::get_reduce_sequence_header(string vhost)
|
|||
return SRS_CONF_PERFER_FALSE(conf->arg0());
|
||||
}
|
||||
|
||||
int SrsConfig::get_publish_1stpkt_timeout(string vhost)
|
||||
srs_utime_t SrsConfig::get_publish_1stpkt_timeout(string vhost)
|
||||
{
|
||||
// when no msg recevied for publisher, use larger timeout.
|
||||
static int DEFAULT = 20000;
|
||||
static srs_utime_t DEFAULT = 20 * SRS_UTIME_SECONDS;
|
||||
|
||||
SrsConfDirective* conf = get_vhost(vhost);
|
||||
if (!conf) {
|
||||
|
@ -4794,7 +4794,7 @@ int SrsConfig::get_publish_1stpkt_timeout(string vhost)
|
|||
return DEFAULT;
|
||||
}
|
||||
|
||||
return ::atoi(conf->arg0().c_str());
|
||||
return (srs_utime_t)(::atoi(conf->arg0().c_str()) * SRS_UTIME_MILLISECONDS);
|
||||
}
|
||||
|
||||
int SrsConfig::get_publish_normal_timeout(string vhost)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue