diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 60a3df0ccd..b1975172cc 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -8,6 +8,7 @@ The changelog for SRS. ## SRS 4.0 Changelog +* v4.0, 2022-10-10, For [#2901](https://github.com/ossrs/srs/issues/2901): Edge: Fast disconnect and reconnect. v4.0.267 * v4.0, 2022-09-27, For [#3167](https://github.com/ossrs/srs/issues/3167): WebRTC: Refine sequence jitter algorithm. v4.0.266 * v4.0, 2022-09-16, For [#3179](https://github.com/ossrs/srs/issues/3179): WebRTC: Make sure the same m-lines order for offer and answer. v4.0.265 * v4.0, 2022-09-09, For [#3174](https://github.com/ossrs/srs/issues/3174): WebRTC: Support Unity to publish or play stream. v4.0.264 diff --git a/trunk/src/app/srs_app_edge.cpp b/trunk/src/app/srs_app_edge.cpp index 019df7e297..9979f46725 100644 --- a/trunk/src/app/srs_app_edge.cpp +++ b/trunk/src/app/srs_app_edge.cpp @@ -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); } diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index d35bce5858..46076d8de6 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 266 +#define VERSION_REVISION 267 #endif