Skip to content

Commit

Permalink
fix the core dump when trying to close srs (#386)
Browse files Browse the repository at this point in the history
  • Loading branch information
SnailTowardThesun authored and winlinvip committed Oct 10, 2016
1 parent fba70af commit 7058411
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions trunk/src/app/srs_app_listener.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

1 comment on commit 7058411

@winlinvip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix #661

Please sign in to comment.