Fix panics from spawn_local tasks dropped on other threads in remote server (#21022)

Michael Sloan created

Closes #21020

Release Notes:

- Fixed remote server panic of "local task dropped by a thread that
didn't spawn it"

Change summary

crates/remote/src/ssh_session.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

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()) }