代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gazelle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From cc46783d0b4e309279b32367a222b19f2bb6defd Mon Sep 17 00:00:00 2001
From: compile_success <980965867@qq.com>
Date: Fri, 18 Nov 2022 12:21:49 +0000
Subject: [PATCH] fix write event error
---
src/lstack/api/lstack_epoll.c | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/src/lstack/api/lstack_epoll.c b/src/lstack/api/lstack_epoll.c
index 19dd69a..02889d6 100644
--- a/src/lstack/api/lstack_epoll.c
+++ b/src/lstack/api/lstack_epoll.c
@@ -128,7 +128,24 @@ static uint32_t update_events(struct lwip_sock *sock)
static void raise_pending_events(struct wakeup_poll *wakeup, struct lwip_sock *sock)
{
- sock->events = update_events(sock);
+ uint32_t event = 0;
+
+ if (NETCONN_IS_DATAIN(sock) || NETCONN_IS_ACCEPTIN(sock)) {
+ event |= EPOLLIN;
+ }
+
+ if (NETCONN_IS_OUTIDLE(sock)) {
+ /* lwip_netconn_do_connected set LIBOS FLAGS when connected */
+ if (sock->conn && CONN_TYPE_IS_LIBOS(sock->conn)) {
+ event |= EPOLLOUT;
+ }
+ }
+
+ if (sock->errevent > 0) {
+ event |= EPOLLERR | EPOLLIN;
+ }
+
+ sock->events = event;
if (sock->events) {
pthread_spin_lock(&wakeup->event_list_lock);
if (wakeup->type == WAKEUP_EPOLL && list_is_null(&sock->event_list)) {
@@ -361,7 +378,7 @@ static int32_t epoll_lwip_event(struct wakeup_poll *wakeup, struct epoll_event *
sock->epoll_events = 0;
}
- events[event_num].events = sock->events;
+ events[event_num].events = sock->events & sock->epoll_events;
events[event_num].data = sock->ep_data;
event_num++;
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。