session ended as disconnect signal
This commit is contained in:
parent
b50a2e01b2
commit
41f95e84c2
|
|
@ -45,7 +45,14 @@ Ollie9pClient::Ollie9pClient(QObject *parent)
|
|||
if (!data.isEmpty())
|
||||
emit chatReceived(QString::fromUtf8(data));
|
||||
});
|
||||
connect(m_chat, &StreamFsm::died, this, &Ollie9pClient::streamingDone);
|
||||
connect(m_chat, &StreamFsm::died, this, [this]() {
|
||||
// The chat stream closes when the selected session ends. Treat that
|
||||
// existing signal as an immediate disconnect for connection tracking;
|
||||
// the periodic connection probe will confirm or recover it later.
|
||||
if (!m_activeSessionId.isEmpty() && !m_agentId.isEmpty())
|
||||
setAgentConnected(agentKey(m_activeSessionId, m_agentId), false);
|
||||
emit streamingDone();
|
||||
});
|
||||
|
||||
// State stream — guarded, reads agent statewait. Auto-restarts until
|
||||
// session/agent is deselected (guard returns false).
|
||||
|
|
|
|||
Reference in New Issue