[fix] isolate background connections and password retries

This commit is contained in:
dijunkun
2026-10-12 03:08:00 +08:00
parent c8907a00f9
commit 54dbd04a8d
8 changed files with 96 additions and 37 deletions
@@ -1867,13 +1867,7 @@ void GuiApplication::Tick() {
if (need_to_rejoin_ && now - last_rejoin_check_time_ >= 1s) {
last_rejoin_check_time_ = now;
need_to_rejoin_ = false;
for (const auto& [_, props] : remote_sessions_) {
if (props && props->rejoin_) {
ConnectTo(props->remote_id_, props->remote_password_,
props->remember_password_);
}
}
HandlePendingRejoins();
}
const bool was_reloading_recent_connections = reload_recent_connections_;
@@ -3703,6 +3697,7 @@ void GuiApplication::CloseRemoteClosedTabs() {
}
void GuiApplication::CloseStreamTab(const std::string& remote_id) {
CancelPendingConnection(remote_id);
std::shared_ptr<RemoteSession> props;
{
std::shared_lock lock(remote_sessions_mutex_);