https long timeout tracked down to ssl_client.cpp and lwip
Posted: Thu Feb 27, 2020 3:40 am
I am trying to post to a https page. Everything works but if you have a scenario where the unit cannot reach the page there is a long 18 second timeout. The timeout command do not affect this. If you change the url to http instead it works and fails immediately and continues. This only seems to affect https calls.
I tracked back through the code and it hangs in the ssl_client.cpp file at this line:
I am guessing that is where its trying to make connection to the server. However, there is no timeout being passed to this call so it must have its own timeout in the lwip_connect but its taking a long time.
In my case for testing I just turn on the parental block on my router for the esp device so that it can't reach the outside world.
Is there a way to adjust the timeout for the lwip_connect? How is this https use of this different from the http?
The 18 second block is too long for my application. Any advice would be appreciated.
I tracked back through the code and it hangs in the ssl_client.cpp file at this line:
Code: Select all
if (lwip_connect(ssl_client->socket, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) == 0) {
In my case for testing I just turn on the parental block on my router for the esp device so that it can't reach the outside world.
Is there a way to adjust the timeout for the lwip_connect? How is this https use of this different from the http?
The 18 second block is too long for my application. Any advice would be appreciated.