From f74f670865956e95a4e852e248beb1b14df34008 Mon Sep 17 00:00:00 2001 From: Michael Sloan Date: Thu, 21 Nov 2024 14:50:38 -0700 Subject: [PATCH] Fix panics from spawn_local tasks dropped on other threads in remote server (#21022) Closes #21020 Release Notes: - Fixed remote server panic of "local task dropped by a thread that didn't spawn it" --- crates/remote/src/ssh_session.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/remote/src/ssh_session.rs b/crates/remote/src/ssh_session.rs index d8c852c019..546135c30b 100644 --- a/crates/remote/src/ssh_session.rs +++ b/crates/remote/src/ssh_session.rs @@ -1074,7 +1074,7 @@ impl SshRemoteClient { c.connections.insert( opts.clone(), ConnectionPoolEntry::Connecting( - cx.foreground_executor() + cx.background_executor() .spawn({ let connection = connection.clone(); async move { Ok(connection.clone()) }