Skip to content

Commit 5a9e829

Browse files
authored
[ISSUE #109] 🐛 Fix shutdown the namesrv throw execption (#110)
1 parent 5fde56d commit 5a9e829

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

rocketmq-common/src/thread_pool.rs

+6
Original file line numberDiff line numberDiff line change
@@ -214,3 +214,9 @@ impl ScheduledExecutorService {
214214
});
215215
}
216216
}
217+
218+
impl ScheduledExecutorService {
219+
pub fn shutdown(self) {
220+
self.inner.shutdown_background();
221+
}
222+
}

rocketmq-namesrv/src/bin/bootstrap_server.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ async fn main() -> anyhow::Result<()> {
7373
Some(notify_conn_disconnect),
7474
)
7575
.await;
76-
drop(scheduled_executor_service);
76+
scheduled_executor_service.shutdown();
7777
Ok(())
7878
}
7979

0 commit comments

Comments
 (0)