Skip to content

Commit

Permalink
Forward: when unpublish crash caused by uninitialized forward connect…
Browse files Browse the repository at this point in the history
…ion. v6.0.107 (ossrs#3914)

Description
A crash occurs when a forward relay connection has not been established
and an unpublish event is triggered simultaneously. For instance, if DVR
and forward are configured with a specified DVR path that already
exists, initiating a stream will trigger a crash.

Objective
Fix the crash caused by the forward mechanism.

Additional Information
For detailed reproduction steps, please refer to issue ossrs#3901.

---------

Co-authored-by: john <[email protected]>
  • Loading branch information
chundonglinlin and xiaozhihong authored Dec 30, 2023
1 parent 360aaaf commit 804ef3f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions trunk/doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The changelog for SRS.
<a name="v6-changes"></a>

## SRS 6.0 Changelog
* v6.0, 2023-12-30, Merge [#3914](https://github.com/ossrs/srs/pull/3914): Forward: when unpublish crash caused by uninitialized forward connection. v6.0.107 (#3914)
* v6.0, 2023-12-15, Merge [#3854](https://github.com/ossrs/srs/pull/3854): Typo: line 263 - srs_app_srt_conn.cpp. v6.0.106 (#3854)
* v6.0, 2023-12-14, Merge [#3910](https://github.com/ossrs/srs/pull/3910): RTC: Support OPUS stereo SDP option. v6.0.105 (#3910)
* v6.0, 2023-12-14, Merge [#3902](https://github.com/ossrs/srs/pull/3902): Security: Support IP whitelist for HTTP-FLV, HLS, WebRTC, and SRT. v6.0.104 (#3902)
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/app/srs_app_forward.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ srs_error_t SrsForwarder::on_publish()
void SrsForwarder::on_unpublish()
{
trd->stop();
sdk->close();
if (sdk) sdk->close();
}

srs_error_t SrsForwarder::on_meta_data(SrsSharedPtrMessage* shared_metadata)
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core_version6.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

#define VERSION_MAJOR 6
#define VERSION_MINOR 0
#define VERSION_REVISION 106
#define VERSION_REVISION 107

#endif

0 comments on commit 804ef3f

Please sign in to comment.