leave method
Leaves
Implementation
@override
Future<void> leave() async {
if (!joined) {
logger.warning('Not joined, cannot leave coordination session');
return;
}
await super.leave();
await _disposeStreams();
// Dispose the controller first: it still needs the transport-managed
// discovery resource and the coordination stream to announce leaving.
logger.finest('Leaving coordination session...');
await _controller.dispose();
await _transport.dispose();
logger.info('Left coordination session');
}