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:
parent
612adb03f8
commit
3d4e50a386
|
|
@ -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);
|
||||
|
|
|
|||
Reference in New Issue