kill: write to session-level ctl instead of agent ctl

Session-level kill (session/{id}/ctl) does the full cleanup:
removes from session map, cancels context, closes agent, kills
toolsrv process, removes persisted JSON. Agent-level kill just
cancels the session context without cleaning up the filesystem.

Also remove unused getAgents call.
This commit is contained in:
Levi Neely 2026-08-01 17:05:19 +02:00
parent 612adb03f8
commit 3d4e50a386
1 changed files with 1 additions and 3 deletions

View File

@ -163,9 +163,7 @@ bool Ollie9pClient::kill()
bool Ollie9pClient::killSession(const QString &sessionId)
{
if (sessionId.isEmpty()) return false;
QStringList agents = getAgents(sessionId);
if (agents.isEmpty()) return false;
QString path = "session/" + sessionId + "/agent/" + agents.first() + "/ctl";
QString path = "session/" + sessionId + "/ctl";
QProcess proc;
proc.start(ninepBin(), {"-a", serverAddr(), "write", path});
proc.waitForStarted(3000);