1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-13 03:41:55 +00:00

fix the core dump when trying to close srs (#386)

This commit is contained in:
ME_Kun_Han 2016-10-10 11:51:49 +08:00 committed by winlin
parent fba70afcc3
commit 7058411cb8

7
trunk/src/app/srs_app_listener.cpp Normal file → Executable file
View file

@ -193,15 +193,10 @@ SrsTcpListener::SrsTcpListener(ISrsTcpHandler* h, string i, int p)
SrsTcpListener::~SrsTcpListener()
{
// close the stfd to trigger thread to interrupted.
srs_close_stfd(_stfd);
pthread->stop();
srs_freep(pthread);
// st does not close it sometimes,
// close it manually.
close(_fd);
srs_close_stfd(_stfd);
}
int SrsTcpListener::fd()