Skip to content

Commit e5ef2a7

Browse files
with shutdown?
1 parent 066023b commit e5ef2a7

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

crates/pg_lsp/src/debouncer.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ impl SimpleTokioDebouncer {
8080
pub async fn shutdown(&self) {
8181
self.shutdown_flag
8282
.store(true, std::sync::atomic::Ordering::Relaxed);
83+
8384
let _ = self.handle.abort(); // we don't care about any errors during shutdown
8485
}
8586
}

crates/pg_lsp/src/server.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,18 @@ impl LanguageServer for LspServer {
227227

228228
#[tracing::instrument(name = "shutdown", skip(self))]
229229
async fn shutdown(&self) -> jsonrpc::Result<()> {
230-
// self.session.shutdown().await;
231-
// self.debouncer.shutdown().await;
230+
tracing::info!("Shutting down session...");
231+
self.session.shutdown().await;
232+
233+
tracing::info!("Shutting down debouncer...");
234+
self.debouncer.shutdown().await;
232235

233236
self.client
234237
.log_message(MessageType::INFO, "Postgres LSP terminated.")
235238
.await;
236239

240+
tracing::info!("Shutdown successful.");
241+
237242
Ok(())
238243
}
239244

0 commit comments

Comments
 (0)