Skip to content

Commit

Permalink
Forward: Fast quit when cycle fail. v4.0.188 (#2284)
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Oct 29, 2021
1 parent 8af98bc commit 8125dd4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions trunk/doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The changelog for SRS.

## SRS 4.0 Changelog

* v4.0, 2021-10-30, Merge [#2284](https://github.com/ossrs/srs/pull/2284): Forward: Fast quit when cycle fail. v4.0.188
* v4.0, 2021-10-28, Merge [#2186](https://github.com/ossrs/srs/pull/2186): Gop: Ignore zero timestamp when shrinking. v4.0.187
* v4.0, 2021-10-27, Merge [#1963](https://github.com/ossrs/srs/pull/1963): Cluster: Origin server shouldn't be it's own coworker. v4.0.186
* v4.0, 2021-10-25, Merge [#2692](https://github.com/ossrs/srs/pull/2692): API: Add server_id into http_hooks. v4.0.185
Expand Down
6 changes: 6 additions & 0 deletions trunk/src/app/srs_app_forward.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,12 @@ srs_error_t SrsForwarder::cycle()
srs_freep(err);
}

// Never wait if thread error, fast quit.
// @see https://github.com/ossrs/srs/pull/2284
if ((err = trd->pull()) != srs_success) {
return srs_error_wrap(err, "forwarder");
}

srs_usleep(SRS_FORWARDER_CIMS);
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core_version4.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

#define VERSION_MAJOR 4
#define VERSION_MINOR 0
#define VERSION_REVISION 187
#define VERSION_REVISION 188

#endif

0 comments on commit 8125dd4

Please sign in to comment.