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

Refine get_publish_normal_timeout in time unit

This commit is contained in:
winlin 2019-04-10 07:58:39 +08:00
parent 170872135d
commit 9b1222a79c
5 changed files with 17 additions and 14 deletions

View file

@ -4797,12 +4797,12 @@ srs_utime_t SrsConfig::get_publish_1stpkt_timeout(string vhost)
return (srs_utime_t)(::atoi(conf->arg0().c_str()) * SRS_UTIME_MILLISECONDS);
}
int SrsConfig::get_publish_normal_timeout(string vhost)
srs_utime_t SrsConfig::get_publish_normal_timeout(string vhost)
{
// the timeout for publish recv.
// we must use more smaller timeout, for the recv never know the status
// of underlayer socket.
static int DEFAULT = 5000;
static srs_utime_t DEFAULT = 5 * SRS_UTIME_SECONDS;
SrsConfDirective* conf = get_vhost(vhost);
if (!conf) {
@ -4819,7 +4819,7 @@ int SrsConfig::get_publish_normal_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_global_chunk_size()