diff --git a/gui/ninepconnection.cpp b/gui/ninepconnection.cpp index 9140ea3..76d3183 100644 --- a/gui/ninepconnection.cpp +++ b/gui/ninepconnection.cpp @@ -92,10 +92,13 @@ void NinePConnection::onFinished(int exitCode, QProcess::ExitStatus) m_process->deleteLater(); m_process = nullptr; if (m_probe && m_state == Connected && m_openMarkerSeen && exitCode == 0 && !m_stopRequested) { - m_retryTimer.start(m_retryMs); + if (m_retryMs > 0) + m_retryTimer.start(m_retryMs); + else + startProcess(); // immediate re-probe return; } - if (m_stopRequested) { + if (m_stopRequested || m_retryMs <= 0) { setState(Disconnected); return; } diff --git a/gui/ollie9pclient.cpp b/gui/ollie9pclient.cpp index 94c0b41..6e348df 100644 --- a/gui/ollie9pclient.cpp +++ b/gui/ollie9pclient.cpp @@ -254,10 +254,11 @@ void Ollie9pClient::reconcileAgentConnections() // rather than showing a transient red indicator. refreshSessions(); }); - // Use immutable IDs in path — aliases in the 9P namespace resolve - // these to the correct session/agent regardless of display name. + // No retry — reconcileAgentConnections is the authority for + // connection lifecycle. If the agent is still alive after refresh, + // reconcile will create a new connection. connection->start(ollie9pBin(), {"-a", serverAddr(), "read", "--open-marker", - "session/" + sid + "/agent/" + aid + "/connection"}, 4000, true); + "session/" + sid + "/agent/" + aid + "/connection"}, 0, true); } } for (auto it = m_agentConnections.begin(); it != m_agentConnections.end();) {