use ssh lsp store (#17655)
Release Notes: - ssh remoting: Added support for booting langauge servers (in limited circumstances) --------- Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
130f19d8f9
commit
36eb1c15ea
45 changed files with 1553 additions and 671 deletions
|
@ -41,11 +41,11 @@ pub struct SshSocket {
|
|||
|
||||
pub struct SshSession {
|
||||
next_message_id: AtomicU32,
|
||||
response_channels: ResponseChannels,
|
||||
response_channels: ResponseChannels, // Lock
|
||||
outgoing_tx: mpsc::UnboundedSender<Envelope>,
|
||||
spawn_process_tx: mpsc::UnboundedSender<SpawnRequest>,
|
||||
client_socket: Option<SshSocket>,
|
||||
state: Mutex<ProtoMessageHandlerSet>,
|
||||
state: Mutex<ProtoMessageHandlerSet>, // Lock
|
||||
}
|
||||
|
||||
struct SshClientState {
|
||||
|
@ -392,9 +392,9 @@ impl SshSession {
|
|||
) -> impl 'static + Future<Output = Result<proto::Envelope>> {
|
||||
envelope.id = self.next_message_id.fetch_add(1, SeqCst);
|
||||
let (tx, rx) = oneshot::channel();
|
||||
self.response_channels
|
||||
.lock()
|
||||
.insert(MessageId(envelope.id), tx);
|
||||
let mut response_channels_lock = self.response_channels.lock();
|
||||
response_channels_lock.insert(MessageId(envelope.id), tx);
|
||||
drop(response_channels_lock);
|
||||
self.outgoing_tx.unbounded_send(envelope).ok();
|
||||
async move { Ok(rx.await.context("connection lost")?.0) }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue