fix subscribe

This commit is contained in:
Wolfgang Hottgenroth
2017-11-28 18:02:06 +01:00
parent 70d0a054cb
commit 65a7e3ba81

View File

@ -81,10 +81,9 @@ public class MqttReceiver {
while (true) { while (true) {
try { try {
client.connect(connOpts); client.connect(connOpts);
for (String topic : parsers.keySet()) { String[] topics = parsers.keySet().toArray(new String[0]);
client.subscribe(topic); client.subscribe(topics);
logger.info("Re-Subscribed: " + topic); logger.info("Re-Subscribed: " + topics.toString());
}
logger.error("reconnecting successfully completed"); logger.error("reconnecting successfully completed");
break; break;
} catch (MqttException e) { } catch (MqttException e) {