1
0
Fork 0
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:
winlin 2022-10-10 08:14:48 +08:00
parent 8bd8c1146d
commit 7d782ee8c9
3 changed files with 9 additions and 3 deletions

View file

@ -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);
}