forceStop method

Future<void> forceStop()

Force-stops the client immediately without graceful session cleanup.

Unlike stop, this does not attempt to destroy sessions via RPC. It clears sessions, kills the connection, and closes the transport.

Implementation

Future<void> forceStop() async {
  _forceStopping = true;
  _sessions.clear();
  _modelsCache = null;

  await _connection?.close();
  _connection = null;
  await _transport?.close();

  _setConnectionState(ConnectionState.disconnected);
}