fix subscribe
This commit is contained in:
@ -81,10 +81,9 @@ public class MqttReceiver {
|
||||
while (true) {
|
||||
try {
|
||||
client.connect(connOpts);
|
||||
for (String topic : parsers.keySet()) {
|
||||
client.subscribe(topic);
|
||||
logger.info("Re-Subscribed: " + topic);
|
||||
}
|
||||
String[] topics = parsers.keySet().toArray(new String[0]);
|
||||
client.subscribe(topics);
|
||||
logger.info("Re-Subscribed: " + topics.toString());
|
||||
logger.error("reconnecting successfully completed");
|
||||
break;
|
||||
} catch (MqttException e) {
|
||||
|
Reference in New Issue
Block a user