disconnect method

Future<void> disconnect()

Implementation

Future<void> disconnect() async {
  if (connectionState == PipeConnectionState.disconnected) {
    _logger.fine(
      'Tried to disconnect while pipe is not connected',
    );
    return;
  }

  try {
    await _hubConnection.stop();
  } catch (err, st) {
    _logger.shout('Could not disconnect from LeanCode pipe service', err, st);
    rethrow;
  }
}