File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ use smol_str::{SmolStr, ToSmolStr};
29
29
use std:: collections:: HashMap ;
30
30
use std:: path:: PathBuf ;
31
31
use std:: time:: Duration ;
32
+ use tokio:: signal;
32
33
use wasmtime:: component:: Component ;
33
34
use wasmtime:: { Engine , Module } ;
34
35
@@ -167,11 +168,16 @@ async fn main() -> anyhow::Result<()> {
167
168
listen_fd : None ,
168
169
backoff : 64 ,
169
170
} ) ;
171
+ let mut terminate = signal:: unix:: signal ( signal:: unix:: SignalKind :: terminate ( ) ) ?;
170
172
tokio:: select! {
171
173
res = http => {
172
174
res?
173
175
} ,
174
- _ = tokio:: signal:: ctrl_c( ) => {
176
+ _ = signal:: ctrl_c( ) => {
177
+ #[ cfg( target_family = "unix" ) ]
178
+ shutdown_coordinator. shutdown( ) . await
179
+ }
180
+ _ = terminate. recv( ) => {
175
181
#[ cfg( target_family = "unix" ) ]
176
182
shutdown_coordinator. shutdown( ) . await
177
183
}
You can’t perform that action at this time.
0 commit comments