mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 11:51:57 +00:00
fix the core dump when trying to close srs (#386)
This commit is contained in:
parent
fba70afcc3
commit
7058411cb8
1 changed files with 1 additions and 6 deletions
7
trunk/src/app/srs_app_listener.cpp
Normal file → Executable file
7
trunk/src/app/srs_app_listener.cpp
Normal file → Executable file
|
@ -193,15 +193,10 @@ SrsTcpListener::SrsTcpListener(ISrsTcpHandler* h, string i, int p)
|
||||||
|
|
||||||
SrsTcpListener::~SrsTcpListener()
|
SrsTcpListener::~SrsTcpListener()
|
||||||
{
|
{
|
||||||
// close the stfd to trigger thread to interrupted.
|
|
||||||
srs_close_stfd(_stfd);
|
|
||||||
|
|
||||||
pthread->stop();
|
pthread->stop();
|
||||||
srs_freep(pthread);
|
srs_freep(pthread);
|
||||||
|
|
||||||
// st does not close it sometimes,
|
srs_close_stfd(_stfd);
|
||||||
// close it manually.
|
|
||||||
close(_fd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int SrsTcpListener::fd()
|
int SrsTcpListener::fd()
|
||||||
|
|
Loading…
Reference in a new issue