1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

For #1684, Prevent stop ingest for multiple times. 3.0.143

This commit is contained in:
winlin 2020-09-14 20:48:44 +08:00
parent 0aecc063e0
commit 905444a1c7
4 changed files with 11 additions and 7 deletions

View file

@ -690,12 +690,13 @@ 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;
state = SrsEdgeStateIngestStopping;
ingester->stop();
state = SrsEdgeStateInit;
srs_trace("edge change from %d to state %d (init).", pstate, state);
srs_trace("edge change from %d to %d then %d (init).", pstate, SrsEdgeStateIngestStopping, state);
return;
}