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

for #209, server cycle to enable the hls to cleanup. do dispose

This commit is contained in:
winlin 2015-05-30 10:48:02 +08:00
parent 567d84e997
commit d611bb6b45
8 changed files with 109 additions and 3 deletions

View file

@ -562,9 +562,12 @@ void SrsServer::dispose()
#ifdef SRS_AUTO_INGEST
ingester->dispose();
srs_trace("gracefully cleanup ingesters");
srs_trace("gracefully dispose ingesters");
#endif
SrsSource::dispose_all();
srs_trace("gracefully dispose sources");
srs_trace("terminate server");
}
@ -962,6 +965,11 @@ int SrsServer::do_cycle()
srs_trace("reload config success.");
}
// notice the stream sources to cycle.
if ((ret = SrsSource::cycle_all()) != ERROR_SUCCESS) {
return ret;
}
// update the cache time
if ((i % SRS_SYS_TIME_RESOLUTION_MS_TIMES) == 0) {
srs_info("update current time cache.");