terminate method

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

Terminates this channel.

RPCs already in progress will be terminated. No further RPCs can be made on this channel.

Implementation

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