代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gazelle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From a066142dfb38235ea46307e4b1d3395dcc2694a7 Mon Sep 17 00:00:00 2001
From: wuchangsheng <wuchangsheng2@huawei.com>
Date: Tue, 15 Mar 2022 17:47:42 +0800
Subject: [PATCH 26/34] get fin notice app
---
src/lstack/api/lstack_epoll.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/lstack/api/lstack_epoll.c b/src/lstack/api/lstack_epoll.c
index cf072b0..1f0aea8 100644
--- a/src/lstack/api/lstack_epoll.c
+++ b/src/lstack/api/lstack_epoll.c
@@ -73,6 +73,11 @@ void add_epoll_event(struct netconn *conn, uint32_t event)
/* conn sock nerver null, because lwip call this func */
struct lwip_sock *sock = get_socket(conn->socket);
+ /* close_wait event should be (EPOLLRDHUP | EPOLLIN), but lwip is EPOLLERR */
+ if (event == EPOLLERR && conn->pcb.tcp && conn->pcb.tcp->state == CLOSE_WAIT) {
+ event = EPOLLRDHUP | EPOLLIN | EPOLLERR;
+ }
+
/* shadow_fd event notice listen_fd */
if (sock->shadowed_sock) {
sock = sock->shadowed_sock;
@@ -286,7 +291,6 @@ static int32_t get_lwip_events(struct weakup_poll *weakup, void *out, uint32_t m
struct epoll_event *events = (struct epoll_event *)out;
struct pollfd *fds = (struct pollfd *)out;
-
if (etype == TYPE_EPOLL) {
maxevents = LWIP_MIN(EPOLL_MAX_EVENTS, maxevents);
}
@@ -300,7 +304,7 @@ static int32_t get_lwip_events(struct weakup_poll *weakup, void *out, uint32_t m
}
/* close sock */
if (sock->stack == NULL) {
- return true;
+ continue;
}
__atomic_store_n(&sock->have_event, false, __ATOMIC_RELEASE);
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。