stop method

Future<void> stop()

Implementation

Future<void> stop() async {
  if (_stopped) return;
  _stopped = true;
  _core.stop();
  await _socket?.close();
  for (var path in [_handlePath, _socketPath]) {
    if (path == null) continue;
    try {
      File(path).deleteSync();
    } on FileSystemException {
      // Already gone — a sweep or a successor got there first.
    }
  }
}