lwip - Fixed handling of max sockets in socket_accept

pull/2579/head
Christopher Haster 2016-08-29 17:20:05 -05:00
parent 9111aa4c2d
commit 506aa3d4ea
1 changed files with 3 additions and 0 deletions

View File

@ -308,6 +308,9 @@ static int lwip_socket_accept(nsapi_stack_t *stack, nsapi_socket_t server, nsapi
{
struct lwip_socket *s = (struct lwip_socket *)server;
struct lwip_socket *ns = lwip_arena_alloc();
if (!ns) {
return NSAPI_ERROR_NO_SOCKET;
}
err_t err = netconn_accept(s->conn, &ns->conn);
if (err != ERR_OK) {