gazelle/0081-read-data-with-err-event.patch
wu-changsheng 076a4017d3 backport bugifx and doc
(cherry picked from commit e7c415a3eb5695fd1f2c2baadc77f4480765375c)
2022-09-05 16:26:12 +08:00

26 lines
737 B
Diff

From 27f6745def82693c661aaf0a1a6353790955755c Mon Sep 17 00:00:00 2001
From: wu-changsheng <wuchangsheng2@huawei.com>
Date: Sat, 3 Sep 2022 20:51:41 +0800
Subject: [PATCH 18/20] read data with err event
---
src/lstack/core/lstack_lwip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lstack/core/lstack_lwip.c b/src/lstack/core/lstack_lwip.c
index 35b67f5..10c2cd9 100644
--- a/src/lstack/core/lstack_lwip.c
+++ b/src/lstack/core/lstack_lwip.c
@@ -577,7 +577,7 @@ ssize_t read_stack_data(int32_t fd, void *buf, size_t len, int32_t flags)
GAZELLE_RETURN(EINVAL);
}
- if (sock->errevent > 0) {
+ if (sock->errevent > 0 && !NETCONN_IS_DATAIN(sock)) {
return 0;
}
--
2.23.0