From 3f33dffdb35ebea00b3db2aa14bd2e8689153300 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 12 May 2014 13:14:36 +0800 Subject: [PATCH] refine the quit and destroy, quit when normal, destroy only for gmc --- trunk/src/app/srs_app_server.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trunk/src/app/srs_app_server.cpp b/trunk/src/app/srs_app_server.cpp index 86395403f..23847bb06 100644 --- a/trunk/src/app/srs_app_server.cpp +++ b/trunk/src/app/srs_app_server.cpp @@ -563,12 +563,15 @@ int SrsServer::cycle() ret = do_cycle(); +#ifdef SRS_AUTO_GPERF_MC destroy(); -#ifdef SRS_AUTO_GPERF_MC srs_warn("sleep a long time for system st-threads to cleanup."); st_usleep(3 * 1000 * 1000); srs_warn("system quit"); +#else + srs_warn("main cycle terminated, system quit normally."); + exit(0); #endif return ret;