mirror of https://github.com/ARMmbed/mbed-os.git
lwip - Fixed handling of max sockets in socket_accept
parent
9111aa4c2d
commit
506aa3d4ea
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue