Fix yield exception

Fix yield exception using non PubSubClient library
This commit is contained in:
Theo Arends 2018-07-25 10:35:36 +02:00
parent 9376b6f7c0
commit c2b3ff1fd2
1 changed files with 3 additions and 3 deletions

View File

@ -92,7 +92,9 @@ void MqttSubscribeLib(char *topic)
bool MqttPublishLib(const char* topic, boolean retained)
{
return MqttClient.publish(topic, mqtt_data, retained);
bool result = MqttClient.publish(topic, mqtt_data, retained);
yield(); // #3313
return result;
}
void MqttLoop()
@ -231,8 +233,6 @@ void MqttPublishDirect(const char* topic, boolean retained)
if (Settings.ledstate &0x04) {
blinks++;
}
yield(); // #3313
}
void MqttPublish(const char* topic, boolean retained)