$callWebServerStop static method

Future<void> $callWebServerStop(
  1. Node node,
  2. NodeStorage storage,
  3. PrecisionStopwatch wallClock
)

Implementation

static Future<void> $callWebServerStop(
    Node node, NodeStorage storage, PrecisionStopwatch wallClock) async {
  if (node is WebServer) {
    await (node as WebServer).$server?.close(force: false);
    (node as WebServer).$server = null;

    node.logger.info(
        "Stopped WebServer in ${wallClock.getMilliseconds().toStringAsFixed(0)}ms");
  }
}