Closed
Description
Basic Infos
- This issue complies with the issue POLICY doc.
- I have read the documentation at readthedocs and the issue is not addressed there.
- I have tested that the issue is present in current master branch (aka latest git).
- I have searched the issue tracker for a similar issue.
- If there is a stack dump, I have decoded it.
- I have filled out all fields below.
Platform
- Hardware: esp82xx
- Core Version: git master
- Development Env: Arduino IDE
- Operating System: any
Settings in IDE
- Module: any
- Flash Mode: any
- Flash Size: any
- Reset Method: any
- Flash Frequency: any
- CPU Frequency: any
- Upload Using: any
- Upload Speed: any
Problem Description
LwipIntfDev::connected()
always returns true once it has connected once and acquired an IP address. So this does not really reflect the fact that the connection is active like you have with the WiFi. Even if you unplug the cable, it still returns true. This prevents to re-route to WiFi when ethernet is down.
Can't we replace this by checking the socket status by calling getSn_SR() ?
MCVE Sketch
https://github.com/esp8266/Arduino/blob/master/libraries/lwIP_w5500/examples/TCPClient/TCPClient.ino