public synchronized void connectionLost(Throwable t) {
logger.error("MQTT connection to broker was lost", t);
if (t instanceof MqttException) {
MqttException e = (MqttException) t;
logger.error("MQTT connection to '{}' was lost: {} : ReasonCode {} : Cause : {}",
new Object[] { name, e.getMessage(), e.getReasonCode(), (e.getCause() == null ? "Unknown" : e.getCause().getMessage()) });
} else {
logger.error("MQTT connection to '{}' was lost: {}", name, t.getMessage());
}
started = false;