Browse Source

Update at_socket.c

at接收超时 添加   EAGAIN  类型返回
HubretXie 6 years ago
parent
commit
b9d6336526
1 changed files with 1 additions and 0 deletions
  1. 1 0
      components/net/at/at_socket/at_socket.c

+ 1 - 0
components/net/at/at_socket/at_socket.c

@@ -668,6 +668,7 @@ int at_recvfrom(int socket, void *mem, size_t len, int flags, struct sockaddr *f
         if (rt_sem_take(sock->recv_notice, timeout) < 0)
         {
             LOG_E("AT socket (%d) receive timeout (%d)!", socket, timeout);
+            errno = EAGAIN;
             result = -1;
             goto __exit;
         }