From 27083430ce79f1954e6253195b712e5c7200c8d5 Mon Sep 17 00:00:00 2001 From: Haibo Chen Date: Thu, 4 Nov 2021 07:28:48 +0800 Subject: [PATCH] Edge: Refuse edge request when state is stopping (#2707) --- trunk/doc/CHANGELOG.md | 1 + trunk/src/app/srs_app_edge.cpp | 2 ++ trunk/src/core/srs_core_version4.hpp | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 71771ecd08..7428927d01 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, 2021-11-04, Merge [#2707](https://github.com/ossrs/srs/pull/2707): Refuse edge request when state is stopping. v4.0.192 * v4.0, 2021-11-02, Auto create package by github actions. v4.0.191 * v4.0, 2021-10-30, Merge [#2552](https://github.com/ossrs/srs/pull/2552): Script: Refine CentOS7 service script to restart SRS. v4.0.190 * v4.0, 2021-10-30, Merge [#2397](https://github.com/ossrs/srs/pull/2397): SRTP: Patch libsrtp2 to fix GCC10 build fail. v4.0.189 diff --git a/trunk/src/app/srs_app_edge.cpp b/trunk/src/app/srs_app_edge.cpp index 24ff586326..019df7e297 100644 --- a/trunk/src/app/srs_app_edge.cpp +++ b/trunk/src/app/srs_app_edge.cpp @@ -670,6 +670,8 @@ srs_error_t SrsPlayEdge::on_client_play() if (state == SrsEdgeStateInit) { state = SrsEdgeStatePlay; err = ingester->start(); + } else if (state == SrsEdgeStateIngestStopping) { + return srs_error_new(ERROR_RTMP_EDGE_PLAY_STATE, "state is stopping"); } return err; diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index 26bca7521b..bf8b54c247 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 191 +#define VERSION_REVISION 192 #endif