From 61728118ab80d39c52ea9a5a5bbc6d41692c7757 Mon Sep 17 00:00:00 2001 From: winlin Date: Wed, 10 Sep 2014 14:58:19 +0800 Subject: [PATCH] donot destroy the source and connections of gmc. --- trunk/src/app/srs_app_server.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/trunk/src/app/srs_app_server.cpp b/trunk/src/app/srs_app_server.cpp index efb072adf..a8bbe3c95 100644 --- a/trunk/src/app/srs_app_server.cpp +++ b/trunk/src/app/srs_app_server.cpp @@ -385,7 +385,8 @@ void SrsServer::destroy() srs_freep(signal_manager); srs_freep(kbps); - for (std::vector::iterator it = conns.begin(); it != conns.end();) { + // never destroy the connections, for it's still alive. + /*for (std::vector::iterator it = conns.begin(); it != conns.end();) { SrsConnection* conn = *it; // remove the connection, then free it, @@ -395,9 +396,12 @@ void SrsServer::destroy() srs_freep(conn); } - conns.clear(); + conns.clear();*/ - SrsSource::destroy(); + // never destroy the source, + // when we free all sources, the fmle publish may retry + // and segment fault. + //SrsSource::destroy(); } int SrsServer::initialize()