From b9d6336526ba03c32704c8a5e2f856cdda4107fa Mon Sep 17 00:00:00 2001 From: HubretXie Date: Thu, 1 Nov 2018 14:23:30 +0800 Subject: [PATCH] Update at_socket.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit at接收超时 添加 EAGAIN 类型返回 --- components/net/at/at_socket/at_socket.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/net/at/at_socket/at_socket.c b/components/net/at/at_socket/at_socket.c index 6fd2e765d..6357caa66 100644 --- a/components/net/at/at_socket/at_socket.c +++ b/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; } -- GitLab