File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -613,26 +613,23 @@ bool pointperfectUpdateKeys()
613
613
614
614
systemPrintf (" Attempting to connect to MQTT broker: %s\r\n " , settings.pointPerfectBrokerHost );
615
615
616
- if (mqttClient.connect (settings.pointPerfectClientID ))
616
+ if (mqttClient.connect (settings.pointPerfectClientID ) == true )
617
617
{
618
618
// Successful connection
619
619
systemPrintln (" MQTT connected" );
620
620
621
621
// Originally the provisioning process reported the '/pp/key/Lb' channel which fails to respond with
622
622
// keys. Looks like they fixed it to /pp/ubx/0236/Lb.
623
623
mqttClient.subscribe (settings.pointPerfectLBandTopic );
624
- break ;
625
624
}
626
-
627
- // Check for connection failure
628
- if (mqttClient.connected () == false )
625
+ else
629
626
{
630
627
systemPrintln (" Failed to connect to MQTT Broker" );
631
628
632
629
// MQTT does not provide good error reporting.
633
630
// Throw out everything and attempt to provision the device to get better error checking.
634
631
pointperfectProvisionDevice ();
635
- break ;
632
+ break ; // Skip the remaining MQTT checking, release resources
636
633
}
637
634
638
635
systemPrint (" Waiting for keys" );
You can’t perform that action at this time.
0 commit comments