mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Fix #2901: Edge: Fast disconnect and reconnect. v5.0.78
This commit is contained in:
commit
21b9345387
4 changed files with 11 additions and 4 deletions
|
@ -446,8 +446,8 @@ void SrsEdgeIngester::stop()
|
|||
{
|
||||
trd->stop();
|
||||
upstream->close();
|
||||
|
||||
// notice to unpublish.
|
||||
|
||||
// Notify source to un-publish if exists.
|
||||
if (source) {
|
||||
source->on_unpublish();
|
||||
}
|
||||
|
@ -496,6 +496,11 @@ srs_error_t SrsEdgeIngester::cycle()
|
|||
ISrsApmSpan* stop = _srs_apm->span("edge-stop")->set_kind(SrsApmKindConsumer)->as_child(span_main_)->end();
|
||||
srs_freep(stop);
|
||||
|
||||
// Check whether coroutine is stopped, see https://github.com/ossrs/srs/issues/2901
|
||||
if ((err = trd->pull()) != srs_success) {
|
||||
return srs_error_wrap(err, "edge ingester");
|
||||
}
|
||||
|
||||
srs_usleep(SRS_EDGE_INGESTER_CIMS);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue