From 00a25ee5c5ad91cf42d0e3f2d25cbd4200256495 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 8 Jun 2015 14:08:12 +0800 Subject: [PATCH] cleanup connections when terminate server. --- trunk/src/app/srs_app_rtmp_conn.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trunk/src/app/srs_app_rtmp_conn.cpp b/trunk/src/app/srs_app_rtmp_conn.cpp index 78710d34d..a72dcfc9e 100644 --- a/trunk/src/app/srs_app_rtmp_conn.cpp +++ b/trunk/src/app/srs_app_rtmp_conn.cpp @@ -324,7 +324,10 @@ int SrsRtmpConn::service_cycle() ret = stream_service_cycle(); // stream service must terminated with error, never success. - srs_assert(ret != ERROR_SUCCESS); + // when terminated with success, it's user required to stop. + if (ret == ERROR_SUCCESS) { + continue; + } // when not system control error, fatal error, return. if (!srs_is_system_control_error(ret)) {