From 232019e8d1569e18cfd564100febe2cb3a23bc0a Mon Sep 17 00:00:00 2001 From: chenyong <1521761801@qq.com> Date: Thu, 25 Jul 2019 11:20:40 +0800 Subject: [PATCH] [net][sal] Fix not clean event issue after poll get the error event in lwIP. Signed-off-by: chenyong <1521761801@qq.com> --- components/net/sal_socket/impl/af_inet_lwip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/net/sal_socket/impl/af_inet_lwip.c b/components/net/sal_socket/impl/af_inet_lwip.c index e53aa845cc..56df735ab9 100644 --- a/components/net/sal_socket/impl/af_inet_lwip.c +++ b/components/net/sal_socket/impl/af_inet_lwip.c @@ -273,6 +273,8 @@ static int inet_poll(struct dfs_fd *file, struct rt_pollreq *req) if (sock->errevent) { mask |= POLLERR; + /* clean error event */ + sock->errevent = 0; } rt_hw_interrupt_enable(level); }