Broadcast presence on WiFi (re)connect immediately
This commit is contained in:
parent
e409bd298a
commit
1b351b7743
@ -133,7 +133,7 @@ void WLED::loop()
|
||||
ntpLastSyncTime = 0;
|
||||
strip.restartRuntime();
|
||||
}
|
||||
if (millis() - lastMqttReconnectAttempt > 30000) {
|
||||
if (millis() - lastMqttReconnectAttempt > 30000 || lastMqttReconnectAttempt == 0) { // lastMqttReconnectAttempt==0 forces immediate broadcast
|
||||
lastMqttReconnectAttempt = millis();
|
||||
initMqtt();
|
||||
yield();
|
||||
@ -804,6 +804,7 @@ void WLED::handleConnection()
|
||||
initInterfaces();
|
||||
userConnected();
|
||||
usermods.connected();
|
||||
lastMqttReconnectAttempt = 0; // force immediate update
|
||||
|
||||
// shut down AP
|
||||
if (apBehavior != AP_BEHAVIOR_ALWAYS && apActive) {
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
// version code in format yymmddb (b = daily build)
|
||||
#define VERSION 2211190
|
||||
#define VERSION 2211200
|
||||
|
||||
//uncomment this if you have a "my_config.h" file you'd like to use
|
||||
//#define WLED_USE_MY_CONFIG
|
||||
|
Loading…
Reference in New Issue
Block a user