diff --git a/trunk/src/app/srs_app_edge.cpp b/trunk/src/app/srs_app_edge.cpp index 8c057af51..dc09ee0c8 100644 --- a/trunk/src/app/srs_app_edge.cpp +++ b/trunk/src/app/srs_app_edge.cpp @@ -690,6 +690,7 @@ void SrsPlayEdge::on_all_client_stop() // when all client disconnected, // and edge is ingesting origin stream, abort it. if (state == SrsEdgeStatePlay || state == SrsEdgeStateIngestConnected) { + state = SrsEdgeStateIngestStoping; // avoid multi call stop ingester->stop(); SrsEdgeState pstate = state; diff --git a/trunk/src/app/srs_app_edge.hpp b/trunk/src/app/srs_app_edge.hpp index 4c7249614..778c7b592 100644 --- a/trunk/src/app/srs_app_edge.hpp +++ b/trunk/src/app/srs_app_edge.hpp @@ -57,6 +57,7 @@ enum SrsEdgeState // play stream from origin, ingest stream SrsEdgeStateIngestConnected = 101, + SrsEdgeStateIngestStoping = 1000, // For publish edge SrsEdgeStatePublish = 200, };