shutdown method

Future<void> shutdown()

Shuts down all active server connections.

Implementation

Future<void> shutdown() async {
  final connections = this.connections.toList();
  this.connections.clear();
  await Future.wait([
    for (var connection in connections) connection.shutdown(),
  ]);
}