Remove gpui dependency from rpc_client

Also, avoid any contention between connections.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld
2021-06-15 15:18:40 -07:00
co-authored by Nathan Sobo
parent 3db215418c
commit d3a3ad2820
2 changed files with 105 additions and 76 deletions
+2 -1
View File
@@ -671,7 +671,8 @@ impl Workspace {
let stream = smol::net::TcpStream::connect(rpc_address).await?;
let rpc_client = RpcClient::new();
let connection_id = rpc_client.connect(stream, executor).await;
let (connection_id, handler) = rpc_client.add_connection(stream).await;
executor.spawn(handler).detach();
let auth_response = rpc_client
.request(