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

Fix #1206, dispose ingester while server quiting. 3.0.111

This commit is contained in:
winlin 2020-01-29 20:22:28 +08:00
parent a6f88805f3
commit 23ece94064
9 changed files with 77 additions and 12 deletions

View file

@ -520,7 +520,8 @@ void SrsServer::dispose()
close_listeners(SrsListenerRtsp);
close_listeners(SrsListenerFlv);
// @remark don't dispose ingesters, for too slow.
// Fast stop to notify FFMPEG to quit, wait for a while then fast kill.
ingester->dispose();
// dispose the source for hls and dvr.
_srs_sources->dispose();
@ -856,17 +857,14 @@ void SrsServer::on_signal(int signo)
srs_trace("gmc is on, main cycle will terminate normally.");
signal_gmc_stop = true;
#else
srs_trace("user terminate program");
#ifdef SRS_AUTO_MEM_WATCH
#ifdef SRS_AUTO_MEM_WATCH
srs_memory_report();
#endif
#endif
exit(0);
#endif
return;
}
if (signo == SRS_SIGNAL_GRACEFULLY_QUIT && !signal_gracefully_quit) {
srs_trace("user terminate program, gracefully quit.");
if ((signo == SIGINT || signo == SRS_SIGNAL_GRACEFULLY_QUIT) && !signal_gracefully_quit) {
srs_trace("sig=%d, user terminate program, gracefully quit", signo);
signal_gracefully_quit = true;
return;
}