disconnect method

  1. @override
MqttConnectionState disconnect()
override

Disconnects

Implementation

@override
MqttConnectionState disconnect() {
  MqttLogger.log('MqttConnectionHandlerBase::disconnect - entered');
  if (connectionStatus.state == MqttConnectionState.connected) {
    // Send a disconnect message to the broker
    sendMessage(MqttDisconnectMessage());
  }
  // Disconnect
  _performConnectionDisconnect();
  return connectionStatus.state;
}