disconnect method

Future<void> disconnect()

Implementation

Future<void> disconnect() async {
  if (_connection != null) {
    var tmpConnection = _connection;
    _connection = null;
    await tmpConnection!.close();
  }
}