winlin

refine the quit and destroy, quit when normal, destroy only for gmc

@@ -563,12 +563,15 @@ int SrsServer::cycle() @@ -563,12 +563,15 @@ int SrsServer::cycle()
563 563
564 ret = do_cycle(); 564 ret = do_cycle();
565 565
  566 +#ifdef SRS_AUTO_GPERF_MC
566 destroy(); 567 destroy();
567 568
568 -#ifdef SRS_AUTO_GPERF_MC  
569 srs_warn("sleep a long time for system st-threads to cleanup."); 569 srs_warn("sleep a long time for system st-threads to cleanup.");
570 st_usleep(3 * 1000 * 1000); 570 st_usleep(3 * 1000 * 1000);
571 srs_warn("system quit"); 571 srs_warn("system quit");
  572 +#else
  573 + srs_warn("main cycle terminated, system quit normally.");
  574 + exit(0);
572 #endif 575 #endif
573 576
574 return ret; 577 return ret;