Explorar o código

[net][sal] Fix not clean event issue after poll get the error event in lwIP.

Signed-off-by: chenyong <1521761801@qq.com>
chenyong %!s(int64=6) %!d(string=hai) anos
pai
achega
232019e8d1
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      components/net/sal_socket/impl/af_inet_lwip.c

+ 2 - 0
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);
     }