Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

event data 存贮fd超过其size #55

Open
changruisun opened this issue Jun 14, 2017 · 1 comment
Open

event data 存贮fd超过其size #55

changruisun opened this issue Jun 14, 2017 · 1 comment

Comments

@changruisun
Copy link

我看你这里面构造了
struct event {
int size;
int onexit;
struct iner_event *ie;
struct event_data data[0];
};
选择一个epoll收到一个fd的时间,会设置和读取 event.event_data[fd], 这个fd会越界吗,超过size的值吗

@changruisun
Copy link
Author

我好像明白点,你这都是UDP或者短链接,每次epoll获取的fd个数小于size,然后事件处理都能消耗完成和关闭socket,fd的值也就不会增加。但是恶性情况下,压力和并发大,应该还是造成风险,fetcher处理过慢的话

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant