mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Fix #2901: Edge: Fast disconnect and reconnect. v4.0.267
This commit is contained in:
parent
8bd8c1146d
commit
7d782ee8c9
3 changed files with 9 additions and 3 deletions
|
@ -201,8 +201,8 @@ void SrsEdgeIngester::stop()
|
|||
{
|
||||
trd->stop();
|
||||
upstream->close();
|
||||
|
||||
// notice to unpublish.
|
||||
|
||||
// Notify source to un-publish if exists.
|
||||
if (source) {
|
||||
source->on_unpublish();
|
||||
}
|
||||
|
@ -232,6 +232,11 @@ srs_error_t SrsEdgeIngester::cycle()
|
|||
srs_freep(err);
|
||||
}
|
||||
|
||||
// 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