onError method
OnError listener callback
Implementation
@override
void onError(dynamic error) {
_disconnect();
if (onDisconnected != null) {
MqttLogger.log(
'MqttConnectionBase::_onError - calling disconnected callback');
onDisconnected!();
}
}