Avoid some mqtt server connection
Do not check subscription when we do not subscribe
This commit is contained in:
parent
73d6e17dc1
commit
7b1d9ae63e
@ -197,7 +197,10 @@ void MqttCheckIRQ() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MqttCheckSubscription() {
|
void MqttCheckSubscription()
|
||||||
|
{
|
||||||
|
if (mqtt->getSubscriptionCount() == 0)
|
||||||
|
return;
|
||||||
if (MqttConnect() == 0) {
|
if (MqttConnect() == 0) {
|
||||||
Adafruit_MQTT_Subscribe *subscription;
|
Adafruit_MQTT_Subscribe *subscription;
|
||||||
while ((subscription = mqtt->readSubscription(0))) {
|
while ((subscription = mqtt->readSubscription(0))) {
|
||||||
|
@ -15,7 +15,7 @@ int TeleinfoSetup() {
|
|||||||
inline int TeleinfoProcess(std::vector<struct mqttInfo> &){
|
inline int TeleinfoProcess(std::vector<struct mqttInfo> &){
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
int TeleinfoProcess(float &iinst, float &papp, float &base){
|
int TeleinfoProcess(float &, float &, float &){
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user