mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
disable the hls_dispose by default to 0, for p2p system should never cleanup for timeshift hls.
This commit is contained in:
parent
4e42b9c628
commit
af9efe9213
3 changed files with 12 additions and 3 deletions
|
@ -3566,7 +3566,7 @@ int SrsConfig::get_hls_dispose(string vhost)
|
|||
{
|
||||
SrsConfDirective* conf = get_hls(vhost);
|
||||
|
||||
int DEFAULT = 300;
|
||||
int DEFAULT = 0;
|
||||
|
||||
if (!conf) {
|
||||
return DEFAULT;
|
||||
|
|
|
@ -1155,6 +1155,14 @@ void SrsHls::dispose()
|
|||
on_unpublish();
|
||||
}
|
||||
|
||||
// only dispose hls when positive.
|
||||
if (_req) {
|
||||
int hls_dispose = _srs_config->get_hls_dispose(_req->vhost);
|
||||
if (hls_dispose <= 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
muxer->dispose();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue