fix: MQTT connection on Portduino/Linux native nodes (#10330)
isConnectedToNetwork() always returned false on ARCH_PORTDUINO because none of HAS_WIFI, HAS_ETHERNET, or USE_WS5500 are defined for Linux native builds. This caused wantsLink() to always return false, preventing the MQTT thread from ever connecting at boot. Fix: return true for ARCH_PORTDUINO since Linux always has network access available. Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
This commit is contained in:
co-authored by
GitHub
Jonathan Bennett
parent
e19f531059
commit
a0951f23c3
@@ -350,6 +350,8 @@ inline bool isConnectedToNetwork()
|
||||
return WiFi.isConnected();
|
||||
#elif HAS_ETHERNET
|
||||
return Ethernet.linkStatus() == LinkON;
|
||||
#elif defined(ARCH_PORTDUINO)
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user