Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions cmux-tui/crates/chatmux-relay/src/preview_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,7 @@ async fn spawn_proxy(target_port: u16, ring: Arc<ConsoleRing>) -> Result<ProxyRu
}
}
}
connections.abort_all();
while connections.join_next().await.is_some() {}
connections.shutdown().await;
let upgrades = shared
.upgrades
.lock()
Expand Down
6 changes: 2 additions & 4 deletions cmux-tui/crates/cmux-remote/src/bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ impl ForwardConnections {

async fn shutdown(&self) {
let mut tasks = self.tasks.lock().await;
tasks.abort_all();
while tasks.join_next().await.is_some() {}
tasks.shutdown().await;
}

fn abort_all(&self) {
Expand Down Expand Up @@ -205,8 +204,7 @@ pub async fn serve_mux_bridge(
}
}
}
connections.abort_all();
while connections.join_next().await.is_some() {}
connections.shutdown().await;
}

#[derive(Debug, Default, PartialEq, Eq)]
Expand Down
3 changes: 1 addition & 2 deletions cmux-tui/crates/cmux-remote/src/services.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,7 @@ impl DaemonServices {
}
}
self.workspace.shutdown().await;
handlers.abort_all();
while handlers.join_next().await.is_some() {}
handlers.shutdown().await;
self.workspace.shutdown().await;
}

Expand Down
Loading