Can we get available number of socket connection out of CONFIG_LWIP_MAX_SOCKETS

akshaay24
Posts: 12
Joined: Wed Jul 14, 2021 5:21 am

Can we get available number of socket connection out of CONFIG_LWIP_MAX_SOCKETS

Postby akshaay24 » Wed Nov 29, 2023 1:18 pm

Hi,

We are using aws mqtt connection, aws jobs connection and one https client connection.
All these connections are initialized, connected and de-initialize as per our use case. We know all these connections happens over socket.

After multiple times connection & disconnection sometimes while connecting to https client it shows below error, after that https client never connect and gives below error while using esp_http_client_perform();

Code: Select all

E (11:27:18.347) TRANSPORT_BASE: Failed to initialize new connection object
E (11:27:18.355) HTTP_CLIENT: Connection failed, sock < 0
E (11:27:18.361) PHY_OTA : HTTP request failed : 28674
So we are considering that we have exhausted all available sockets.

1. Is there any way to determine number of available socket connection?
2. Suppose, if we call disconnect wifi esp_wifi_disconnect(); does it closes all socket connection?

ESP-IDF -> v4.4
CONFIG_LWIP_MAX_SOCKETS = 9

Thanks.
Regards,
Akshay

Who is online

Users browsing this forum: No registered users and 185 guests