summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorchenyong <[email protected]>2019-07-25 11:20:40 +0800
committerchenyong <[email protected]>2019-07-25 11:20:40 +0800
commit232019e8d1569e18cfd564100febe2cb3a23bc0a (patch)
treef2a2f0d02883b84092f2646da3673f2eca412caf /components
parent7278bcb5f2f4c57a4b57f9b04347f9af6443731f (diff)
[net][sal] Fix not clean event issue after poll get the error event in lwIP.
Signed-off-by: chenyong <[email protected]>
Diffstat (limited to 'components')
-rw-r--r--components/net/sal_socket/impl/af_inet_lwip.c2
1 files changed, 2 insertions, 0 deletions
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);
}