Skip to content

Commit

Permalink
fix #546, thread terminate normally dispose bug. 2.0.203
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Dec 22, 2015
1 parent cee8c3d commit c785057
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ Remark:

## History

* v2.0, 2015-12-22, for [#546][bug #546] thread terminate normally dispose bug. 2.0.203
* v2.0, 2015-12-22, for [#541][bug #541] failed when chunk size too small. 2.0.202
* v2.0, 2015-12-15, default hls_on_error to continue. 2.0.201
* v2.0, 2015-11-16, for [#518][bug #518] fix fd leak bug when fork. 2.0.200
Expand Down Expand Up @@ -1209,6 +1210,7 @@ Winlin
[bug #511]: https://github.com/ossrs/srs/issues/511
[bug #518]: https://github.com/ossrs/srs/issues/518
[bug #541]: https://github.com/ossrs/srs/issues/541
[bug #546]: https://github.com/ossrs/srs/issues/546
[bug #xxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxx

[exo #828]: https://github.com/google/ExoPlayer/pull/828
Expand Down
8 changes: 5 additions & 3 deletions trunk/src/app/srs_app_thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,13 @@ namespace internal {
// readly terminated now.
really_terminated = true;

handler->on_thread_stop();
srs_info("thread %s cycle finished", _name);

// when thread terminated normally, also disposed.
// we must set to disposed before the on_thread_stop, which may free the thread.
// @see https://github.com/ossrs/srs/issues/546
disposed = true;

handler->on_thread_stop();
srs_info("thread %s cycle finished", _name);
}

void* SrsThread::thread_fun(void* arg)
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR 2
#define VERSION_MINOR 0
#define VERSION_REVISION 202
#define VERSION_REVISION 203

// server info.
#define RTMP_SIG_SRS_KEY "SRS"
Expand Down

0 comments on commit c785057

Please sign in to comment.