peterhinch / micropython-mqtt

A 'resilient' asynchronous MQTT driver. Recovers from WiFi and broker outages.
MIT License
575 stars 126 forks source link

esp8266 wifi stuck in STAT_CONNECTING #33

Closed kevinkk525 closed 4 years ago

kevinkk525 commented 4 years ago

I am able to recreate a state where the network is stuck in STAT_CONNECTING on esp8266 although it is connected, has an IP and all sockets work including webrepl. This might be due to waiting for a dhcp lease renewal or something else. In any case it makes the library wait forever.

Not sure if this case could be possible on other ports as well. Esp32 might behave similarly but would it make sense to implement something similar for other ports without confirmation of it actually being a problem?

Does it even make sense to implement it for esp8266 as it is apparently a very rare situation?

This is due to the issue I raised on micropython 5261

kevinkk525 commented 4 years ago

Changed it to 60s. I have no problem with a really long time there. Still a lot better than hanging forever.

peterhinch commented 4 years ago

Agreed.