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

@ -232,11 +232,13 @@ namespace internal {
// readly terminated now.
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();
srs_info("thread %s cycle finished", _name);
// when thread terminated normally, also disposed.
disposed = true;
}
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
#define VERSION_MAJOR 2
#define VERSION_MINOR 0
#define VERSION_REVISION 202
#define VERSION_REVISION 203
// server info.
#define RTMP_SIG_SRS_KEY "SRS"