close method

Future<void> close()

Disconnects from the Hub and releases resources.

Implementation

Future<void> close() async {
  await _controlSub?.cancel();
  await _mux?.dispose();
  await _connection?.close();
  _connection = null;
  _mux = null;
  _principal = null;
}