mirror of
https://github.com/ossrs/srs.git
synced 2025-02-12 11:21:52 +00:00
防止ingester多次调用stop导致崩溃
This commit is contained in:
parent
63b5c51748
commit
0aecc063e0
2 changed files with 2 additions and 0 deletions
|
@ -690,6 +690,7 @@ void SrsPlayEdge::on_all_client_stop()
|
||||||
// when all client disconnected,
|
// when all client disconnected,
|
||||||
// and edge is ingesting origin stream, abort it.
|
// and edge is ingesting origin stream, abort it.
|
||||||
if (state == SrsEdgeStatePlay || state == SrsEdgeStateIngestConnected) {
|
if (state == SrsEdgeStatePlay || state == SrsEdgeStateIngestConnected) {
|
||||||
|
state = SrsEdgeStateIngestStoping; // avoid multi call stop
|
||||||
ingester->stop();
|
ingester->stop();
|
||||||
|
|
||||||
SrsEdgeState pstate = state;
|
SrsEdgeState pstate = state;
|
||||||
|
|
|
@ -57,6 +57,7 @@ enum SrsEdgeState
|
||||||
// play stream from origin, ingest stream
|
// play stream from origin, ingest stream
|
||||||
SrsEdgeStateIngestConnected = 101,
|
SrsEdgeStateIngestConnected = 101,
|
||||||
|
|
||||||
|
SrsEdgeStateIngestStoping = 1000,
|
||||||
// For publish edge
|
// For publish edge
|
||||||
SrsEdgeStatePublish = 200,
|
SrsEdgeStatePublish = 200,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue