correct topic subscribing when using only RF or IR
This commit is contained in:
1 parent
a65e2bccef
commit
e1b2dd5156
1 file changed
+7
-1
+7
-1
@@ -85,7 +85,13 @@ boolean reconnect() {
|
||||
// Once connected, publish an announcement...
|
||||
client.publish(will_Topic,Gateway_AnnouncementMsg,will_Retain);
|
||||
//Subscribing to topic
|
||||
if (client.subscribe(subjectMQTTtoX) && client.subscribe(subjectMultiGTWRF)&& client.subscribe(subjectMultiGTWIR)) {
|
||||
if (client.subscribe(subjectMQTTtoX)) {
|
||||
#ifdef ZgatewayRF
|
||||
client.subscribe(subjectMultiGTWRF);
|
||||
#endif
|
||||
#ifdef ZgatewayIR
|
||||
client.subscribe(subjectMultiGTWIR);
|
||||
#endif
|
||||
trc(F("Subscription OK to the subjects"));
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user