1 Star 0 Fork 32

hantwofish/gazelle_1

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0207-fix-poll-init-not-clear-old-fd.patch 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
From 5dbdb572406e168205cb9e54b2c247e97a57c22c Mon Sep 17 00:00:00 2001
From: compile_success <980965867@qq.com>
Date: Sat, 29 Jun 2024 07:17:27 +0000
Subject: [PATCH] fix poll init not clear old fd
---
src/lstack/api/lstack_epoll.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/lstack/api/lstack_epoll.c b/src/lstack/api/lstack_epoll.c
index 2791dd7..2ac7150 100644
--- a/src/lstack/api/lstack_epoll.c
+++ b/src/lstack/api/lstack_epoll.c
@@ -837,14 +837,15 @@ static void poll_init(struct wakeup_poll *wakeup, struct pollfd *fds, nfds_t nfd
continue;
}
}
- wakeup->last_fds[i].fd = fd;
- wakeup->last_fds[i].events = fds[i].events;
- poll_change = 1;
if (sock == NULL || sock->conn == NULL || CONN_TYPE_HAS_HOST(sock->conn)) {
update_kernel_poll(wakeup, i, fds + i);
}
+ wakeup->last_fds[i].fd = fd;
+ wakeup->last_fds[i].events = fds[i].events;
+ poll_change = 1;
+
while (sock && sock->conn) {
sock->epoll_events = fds[i].events | POLLERR;
sock->wakeup = wakeup;
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hantwofish/gazelle_1.git
git@gitee.com:hantwofish/gazelle_1.git
hantwofish
gazelle_1
gazelle_1
master

搜索帮助