research st, for bug #193, remove the code with bug, exit when fork.
正在显示
1 个修改的文件
包含
3 行增加
和
19 行删除
| @@ -308,26 +308,10 @@ ST_HIDDEN void _st_epoll_dispatch(void) | @@ -308,26 +308,10 @@ ST_HIDDEN void _st_epoll_dispatch(void) | ||
| 308 | timeout = (int) (min_timeout / 1000); | 308 | timeout = (int) (min_timeout / 1000); |
| 309 | } | 309 | } |
| 310 | 310 | ||
| 311 | - // TODO: WINLIN: remove it for bug introduced. | ||
| 312 | - // @see: https://github.com/winlinvip/simple-rtmp-server/issues/193 | ||
| 313 | if (_st_epoll_data->pid != getpid()) { | 311 | if (_st_epoll_data->pid != getpid()) { |
| 314 | - /* We probably forked, reinitialize epoll set */ | ||
| 315 | - close(_st_epoll_data->epfd); | ||
| 316 | - _st_epoll_data->epfd = epoll_create(_st_epoll_data->fd_hint); | ||
| 317 | - if (_st_epoll_data->epfd < 0) { | ||
| 318 | - /* There is nothing we can do here, will retry later */ | ||
| 319 | - return; | ||
| 320 | - } | ||
| 321 | - fcntl(_st_epoll_data->epfd, F_SETFD, FD_CLOEXEC); | ||
| 322 | - _st_epoll_data->pid = getpid(); | ||
| 323 | - | ||
| 324 | - /* Put all descriptors on ioq into new epoll set */ | ||
| 325 | - memset(_st_epoll_data->fd_data, 0, _st_epoll_data->fd_data_size * sizeof(_epoll_fd_data_t)); | ||
| 326 | - _st_epoll_data->evtlist_cnt = 0; | ||
| 327 | - for (q = _ST_IOQ.next; q != &_ST_IOQ; q = q->next) { | ||
| 328 | - pq = _ST_POLLQUEUE_PTR(q); | ||
| 329 | - _st_epoll_pollset_add(pq->pds, pq->npds); | ||
| 330 | - } | 312 | + // WINLIN: remove it for bug introduced. |
| 313 | + // @see: https://github.com/winlinvip/simple-rtmp-server/issues/193 | ||
| 314 | + exit(-1); | ||
| 331 | } | 315 | } |
| 332 | 316 | ||
| 333 | /* Check for I/O operations */ | 317 | /* Check for I/O operations */ |
-
请 注册 或 登录 后发表评论