File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -5649,7 +5649,7 @@ async fn main() -> Result<()> {
56495649 let git_repo_for_indexing = args. git_repo . clone ( ) ;
56505650 let indexing_state_for_bg = server. indexing_state . clone ( ) ;
56515651 let notification_tx_for_bg = server. notification_tx . clone ( ) ;
5652- let _indexing_handle = tokio:: spawn ( async move {
5652+ let indexing_handle = tokio:: spawn ( async move {
56535653 // Ensure tables exist before indexing
56545654 if let Err ( e) = db_for_indexing. create_tables ( ) . await {
56555655 eprintln ! ( "[Background] Error creating/verifying tables: {}" , e) ;
@@ -5670,6 +5670,10 @@ async fn main() -> Result<()> {
56705670 // Run MCP server on stdio
56715671 run_stdio_server ( server) . await ?;
56725672
5673+ // Gracefully shutdown the background indexing task
5674+ indexing_handle. abort ( ) ;
5675+ let _ = indexing_handle. await ;
5676+
56735677 Ok ( ( ) )
56745678}
56755679
You can’t perform that action at this time.
0 commit comments