don't deadlock on shutdown
Specifically, when we tear down IO threads, we should take care to dispose connection. closes #1775
This commit is contained in:
parent
1acd9d5540
commit
219287a14c
3 changed files with 4 additions and 4 deletions
|
@ -66,7 +66,7 @@ fn run_server() -> Result<()> {
|
||||||
workspace_roots,
|
workspace_roots,
|
||||||
initialize_params.capabilities,
|
initialize_params.capabilities,
|
||||||
server_config,
|
server_config,
|
||||||
&connection,
|
connection,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
log::info!("shutting down IO...");
|
log::info!("shutting down IO...");
|
||||||
|
|
|
@ -52,7 +52,7 @@ pub fn main_loop(
|
||||||
ws_roots: Vec<PathBuf>,
|
ws_roots: Vec<PathBuf>,
|
||||||
client_caps: ClientCapabilities,
|
client_caps: ClientCapabilities,
|
||||||
config: ServerConfig,
|
config: ServerConfig,
|
||||||
connection: &Connection,
|
connection: Connection,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
log::info!("server_config: {:#?}", config);
|
log::info!("server_config: {:#?}", config);
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ pub fn main_loop(
|
||||||
&pool,
|
&pool,
|
||||||
&task_sender,
|
&task_sender,
|
||||||
&libdata_sender,
|
&libdata_sender,
|
||||||
connection,
|
&connection,
|
||||||
&mut world_state,
|
&mut world_state,
|
||||||
&mut loop_state,
|
&mut loop_state,
|
||||||
event,
|
event,
|
||||||
|
|
|
@ -118,7 +118,7 @@ impl Server {
|
||||||
experimental: None,
|
experimental: None,
|
||||||
},
|
},
|
||||||
ServerConfig { with_sysroot, ..ServerConfig::default() },
|
ServerConfig { with_sysroot, ..ServerConfig::default() },
|
||||||
&connection,
|
connection,
|
||||||
)
|
)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue