From 8be3c875af90aa785069d7ddcc8cc36ac73d67ce Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 14 Sep 2015 15:17:59 +0800 Subject: [PATCH] donot release stream when busy --- 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 8a8321034..c09364ce0 100755 --- a/trunk/src/app/srs_app_rtmp_conn.cpp +++ b/trunk/src/app/srs_app_rtmp_conn.cpp @@ -840,7 +840,10 @@ int SrsRtmpConn::publishing(SrsSource* source) // when the acquire error in the midlle-way, the publish state changed, // but failed, so we must cleanup it. // @see https://github.com/simple-rtmp-server/srs/issues/474 - release_publish(source, vhost_is_edge); + // @remark when stream is busy, should never release it. + if (ret != ERROR_SYSTEM_STREAM_BUSY) { + release_publish(source, vhost_is_edge); + } http_hooks_on_unpublish();