stop method

  1. @override
Future<void> stop()

Stops the router and clears the transports.

This method stops the router, clears the list of transports, and performs any necessary cleanup.

Implementation

@override
Future<void> stop() async {
  if (_timer?.isActive ?? false) _timer?.cancel();
  _timer = Timer(
    debounceInterval,
    () async {
      super.stop();
      if (kDebugMode) print('P2P network stopped!');
      await _mdns?.stop();
    },
  );
}