代码拉取完成,页面将自动刷新
同步操作将从 compile_success/gazelle_kylin_src 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 0e6863306602e58e21932ed9b5fccf269e77e1da Mon Sep 17 00:00:00 2001
From: compile_success <980965867@qq.com>
Date: Wed, 28 Jun 2023 11:40:36 +0000
Subject: [PATCH] fix bond4 EPOLLOUT event error
---
src/lstack/api/lstack_epoll.c | 12 ++++++------
src/lstack/core/lstack_lwip.c | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/lstack/api/lstack_epoll.c b/src/lstack/api/lstack_epoll.c
index 06bd71b..55ca4fe 100644
--- a/src/lstack/api/lstack_epoll.c
+++ b/src/lstack/api/lstack_epoll.c
@@ -140,6 +140,11 @@ static void raise_pending_events(struct wakeup_poll *wakeup, struct lwip_sock *s
event |= EPOLLIN;
}
+ if (sock->errevent > 0) {
+ event |= EPOLLERR | EPOLLIN;
+ }
+
+ pthread_spin_lock(&wakeup->event_list_lock);
if (NETCONN_IS_OUTIDLE(sock)) {
/* lwip_netconn_do_connected set LIBOS FLAGS when connected */
if (sock->conn && CONN_TYPE_IS_LIBOS(sock->conn)) {
@@ -147,19 +152,14 @@ static void raise_pending_events(struct wakeup_poll *wakeup, struct lwip_sock *s
}
}
- if (sock->errevent > 0) {
- event |= EPOLLERR | EPOLLIN;
- }
-
if (event) {
- pthread_spin_lock(&wakeup->event_list_lock);
sock->events = event;
if (wakeup->type == WAKEUP_EPOLL && (sock->events & sock->epoll_events) &&
list_is_null(&sock->event_list)) {
list_add_node(&wakeup->event_list, &sock->event_list);
}
- pthread_spin_unlock(&wakeup->event_list_lock);
}
+ pthread_spin_unlock(&wakeup->event_list_lock);
}
int32_t lstack_do_epoll_create(int32_t fd)
diff --git a/src/lstack/core/lstack_lwip.c b/src/lstack/core/lstack_lwip.c
index d53591d..c1346f6 100644
--- a/src/lstack/core/lstack_lwip.c
+++ b/src/lstack/core/lstack_lwip.c
@@ -645,7 +645,7 @@ static inline bool replenish_send_ring(struct protocol_stack *stack, struct lwip
replenish_again = replenish_send_idlembuf(stack, sock);
- if ((sock->epoll_events & EPOLLOUT) && NETCONN_IS_OUTIDLE(sock)) {
+ if (NETCONN_IS_OUTIDLE(sock)) {
add_sock_event(sock, EPOLLOUT);
}
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。