gui: stop validating statewait via agent directory listing
startStateStream now trusts the explicit session/agent selection and opens session/<sid>/agent/<aid>/statewait directly. It no longer calls getAgents(), which was repeatedly listing session/<sid>/agent on every statewait reopen.
This commit is contained in:
parent
3bb75b6c20
commit
cd7bb9e272
|
|
@ -444,14 +444,11 @@ void Ollie9pClient::startStateStream()
|
|||
qDebug() << "startStateStream active session" << m_activeSessionId << "active agent" << m_agentId;
|
||||
if (m_stateProc) return;
|
||||
|
||||
// Check if session still exists before starting
|
||||
// Only explicit session+agent selection may start this stream.
|
||||
// Do NOT preflight by listing session/<sid>/agent; that was causing
|
||||
// repeated agent-directory churn on every reopen.
|
||||
if (m_activeSessionId.isEmpty() || m_agentId.isEmpty()) return;
|
||||
|
||||
// The active agent must be explicitly selected. Do not re-resolve
|
||||
// or auto-fallback here; just stop if the selection is no longer valid.
|
||||
QStringList agents = getAgents(m_activeSessionId);
|
||||
if (agents.isEmpty() || !agents.contains(m_agentId)) return;
|
||||
|
||||
m_stateProc = new QProcess(this);
|
||||
connect(m_stateProc, &QProcess::readyReadStandardOutput, this, &Ollie9pClient::onStateReadyRead);
|
||||
connect(m_stateProc, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished),
|
||||
|
|
|
|||
Reference in New Issue