mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine the quit and destroy, quit when normal, destroy only for gmc
This commit is contained in:
parent
1a1527a857
commit
3f33dffdb3
1 changed files with 4 additions and 1 deletions
|
@ -563,12 +563,15 @@ int SrsServer::cycle()
|
||||||
|
|
||||||
ret = do_cycle();
|
ret = do_cycle();
|
||||||
|
|
||||||
|
#ifdef SRS_AUTO_GPERF_MC
|
||||||
destroy();
|
destroy();
|
||||||
|
|
||||||
#ifdef SRS_AUTO_GPERF_MC
|
|
||||||
srs_warn("sleep a long time for system st-threads to cleanup.");
|
srs_warn("sleep a long time for system st-threads to cleanup.");
|
||||||
st_usleep(3 * 1000 * 1000);
|
st_usleep(3 * 1000 * 1000);
|
||||||
srs_warn("system quit");
|
srs_warn("system quit");
|
||||||
|
#else
|
||||||
|
srs_warn("main cycle terminated, system quit normally.");
|
||||||
|
exit(0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue