File tree Expand file tree Collapse file tree 1 file changed +2
-29
lines changed
Expand file tree Collapse file tree 1 file changed +2
-29
lines changed Original file line number Diff line number Diff line change @@ -175,35 +175,8 @@ async fn main() -> Result<()> {
175175 } )
176176 . await ?;
177177
178- #[ cfg( unix) ]
179- {
180- use tokio:: signal:: unix;
181- let mut terminate = unix:: signal ( unix:: SignalKind :: interrupt ( ) ) ?;
182- tokio:: select! {
183- Err ( e) = handler. start_modules( ) => {
184- error!( "Error running modules: {:?}" , e) ;
185- }
186- _ = tokio:: signal:: ctrl_c( ) => {
187- info!( "Ctrl-C received, shutting down" ) ;
188- }
189- _ = terminate. recv( ) => {
190- info!( "SIGTERM received, shutting down" ) ;
191- }
192- }
193- _ = handler. shutdown_modules ( ) . await ;
194- }
195- #[ cfg( not( unix) ) ]
196- {
197- tokio:: select! {
198- Err ( e) = handler. start_modules( ) => {
199- error!( "Error running modules: {:?}" , e) ;
200- }
201- _ = tokio:: signal:: ctrl_c( ) => {
202- info!( "Ctrl-C received, shutting down" ) ;
203- }
204- }
205- _ = handler. shutdown_modules ( ) . await ;
206- }
178+ handler. start_modules ( ) . await ?;
179+ handler. exit_process ( ) . await ?;
207180
208181 Ok ( ( ) )
209182}
You can’t perform that action at this time.
0 commit comments