Skip to content

Commit afb6d29

Browse files
committed
docs: shutdown handler
Signed-off-by: Gustavo Inacio <[email protected]>
1 parent fbdd8fa commit afb6d29

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

crates/service/src/service.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ pub async fn run() -> anyhow::Result<()> {
120120
//
121121
let service = ServiceExt::<Request>::into_make_service(router);
122122
Ok(serve(listener, service)
123-
.with_graceful_shutdown(shutdown_signal())
123+
.with_graceful_shutdown(shutdown_handler())
124124
.await?)
125125
}
126126

@@ -148,7 +148,8 @@ async fn create_subgraph_client(
148148
))
149149
}
150150

151-
pub async fn shutdown_signal() {
151+
/// Graceful shutdown handler
152+
async fn shutdown_handler() {
152153
let ctrl_c = async {
153154
signal::ctrl_c()
154155
.await

0 commit comments

Comments
 (0)