1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

fix #546, thread terminate normally dispose bug. 2.0.203

This commit is contained in:
winlin 2015-12-22 16:13:49 +08:00
parent cee8c3d07d
commit c7850570c1
3 changed files with 8 additions and 4 deletions

View file

@ -337,6 +337,7 @@ Remark:
## History ## 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-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-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 * v2.0, 2015-11-16, for [#518][bug #518] fix fd leak bug when fork. 2.0.200
@ -1209,6 +1210,7 @@ Winlin
[bug #511]: https://github.com/ossrs/srs/issues/511 [bug #511]: https://github.com/ossrs/srs/issues/511
[bug #518]: https://github.com/ossrs/srs/issues/518 [bug #518]: https://github.com/ossrs/srs/issues/518
[bug #541]: https://github.com/ossrs/srs/issues/541 [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 [bug #xxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxx
[exo #828]: https://github.com/google/ExoPlayer/pull/828 [exo #828]: https://github.com/google/ExoPlayer/pull/828

View file

@ -232,11 +232,13 @@ namespace internal {
// readly terminated now. // readly terminated now.
really_terminated = true; really_terminated = true;
// 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(); handler->on_thread_stop();
srs_info("thread %s cycle finished", _name); srs_info("thread %s cycle finished", _name);
// when thread terminated normally, also disposed.
disposed = true;
} }
void* SrsThread::thread_fun(void* arg) void* SrsThread::thread_fun(void* arg)

View file

@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version // current release version
#define VERSION_MAJOR 2 #define VERSION_MAJOR 2
#define VERSION_MINOR 0 #define VERSION_MINOR 0
#define VERSION_REVISION 202 #define VERSION_REVISION 203
// server info. // server info.
#define RTMP_SIG_SRS_KEY "SRS" #define RTMP_SIG_SRS_KEY "SRS"