shutdown method

  1. @override
Future<void> shutdown()
override

Shuts down this channel.

No further RPCs can be made on this channel. RPCs already in progress will be allowed to complete.

Implementation

@override
Future<void> shutdown() async {
  if (_isShutdown) return;
  _isShutdown = true;
  if (_connected) {
    await _connection.shutdown();
    await _connectionStateStreamController.close();
  }
  _channelShutdownHandler?.call();
}