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) {
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) {