stop method

Future stop ()

Stops the application from running.

Closes down every RequestSinkType and stops listening for HTTP requests.

Implementation

Future stop() async {
  await Future.wait(supervisors.map((s) => s.stop()));
  await server?.server?.close(force: true);

  await ServiceRegistry.defaultInstance.close();
  await _interruptSubscription?.cancel();

  _interruptSubscription = null;
  server = null;
  supervisors = [];

  logger.clearListeners();
}