mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 11:51:57 +00:00
Merge branch 'srs.master'
This commit is contained in:
commit
691b784ae9
2 changed files with 4 additions and 18 deletions
|
@ -309,23 +309,9 @@ ST_HIDDEN void _st_epoll_dispatch(void)
|
|||
}
|
||||
|
||||
if (_st_epoll_data->pid != getpid()) {
|
||||
/* We probably forked, reinitialize epoll set */
|
||||
close(_st_epoll_data->epfd);
|
||||
_st_epoll_data->epfd = epoll_create(_st_epoll_data->fd_hint);
|
||||
if (_st_epoll_data->epfd < 0) {
|
||||
/* There is nothing we can do here, will retry later */
|
||||
return;
|
||||
}
|
||||
fcntl(_st_epoll_data->epfd, F_SETFD, FD_CLOEXEC);
|
||||
_st_epoll_data->pid = getpid();
|
||||
|
||||
/* Put all descriptors on ioq into new epoll set */
|
||||
memset(_st_epoll_data->fd_data, 0, _st_epoll_data->fd_data_size * sizeof(_epoll_fd_data_t));
|
||||
_st_epoll_data->evtlist_cnt = 0;
|
||||
for (q = _ST_IOQ.next; q != &_ST_IOQ; q = q->next) {
|
||||
pq = _ST_POLLQUEUE_PTR(q);
|
||||
_st_epoll_pollset_add(pq->pds, pq->npds);
|
||||
}
|
||||
// WINLIN: remove it for bug introduced.
|
||||
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/193
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
/* Check for I/O operations */
|
||||
|
|
|
@ -52,8 +52,8 @@ int sleep_test()
|
|||
srs_trace("sleep test: start");
|
||||
|
||||
srs_trace("1. sleep...");
|
||||
|
||||
st_usleep(sleep_ms * 1000);
|
||||
|
||||
srs_trace("2. sleep ok");
|
||||
|
||||
srs_trace("sleep test: end");
|
||||
|
|
Loading…
Reference in a new issue