mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
workaround for #511, the fly stfd in close. 2.0.211
This commit is contained in:
parent
a0890fe06a
commit
e2865c6ac1
5 changed files with 12 additions and 10 deletions
|
@ -234,13 +234,9 @@ int srs_st_init()
|
|||
void srs_close_stfd(st_netfd_t& stfd)
|
||||
{
|
||||
if (stfd) {
|
||||
int fd = st_netfd_fileno(stfd);
|
||||
st_netfd_close(stfd);
|
||||
stfd = NULL;
|
||||
|
||||
// st does not close it sometimes,
|
||||
// close it manually.
|
||||
close(fd);
|
||||
// we must ensure the close is ok.
|
||||
int err = st_netfd_close(stfd);
|
||||
srs_assert(err != -1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue