diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 3dbce9fb1..b03f5d224 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -7,6 +7,7 @@ The changelog for SRS. ## SRS 5.0 Changelog +* v5.0, 2022-10-10, For [#2901](https://github.com/ossrs/srs/issues/2901): Edge: Fast disconnect and reconnect. v5.0.78 * v5.0, 2022-10-09, Fix [#3198](https://github.com/ossrs/srs/issues/3198): SRT: Support PUSH SRT by IP and optional port. v5.0.76 * v5.0, 2022-10-06, GB28181: Support GB28181-2016 protocol. v5.0.74 * v5.0, 2022-10-05, HTTP: Skip body and left message by upgrade. v5.0.73 @@ -79,6 +80,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 eedd359ce..07146b1f6 100644 --- a/trunk/src/app/srs_app_edge.cpp +++ b/trunk/src/app/srs_app_edge.cpp @@ -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); } diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index a14bbb167..15dfda0a6 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 diff --git a/trunk/src/core/srs_core_version5.hpp b/trunk/src/core/srs_core_version5.hpp index 95faef15d..870ded146 100644 --- a/trunk/src/core/srs_core_version5.hpp +++ b/trunk/src/core/srs_core_version5.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 5 #define VERSION_MINOR 0 -#define VERSION_REVISION 77 +#define VERSION_REVISION 78 #endif