stop method

Future stop()

Stops the application from running.

Closes every isolate and their channel and stops listening for HTTP requests. The ServiceRegistry will close any of its resources.

Implementation

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

  await ServiceRegistry.defaultInstance.close();
  _hasFinishedLaunching = false;
  server = null;
  supervisors = [];

  logger.clearListeners();
}