mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-04-20 19:38:39 +00:00
add shutdown context unit test
This commit is contained in:
@@ -65,6 +65,7 @@ func aptlyAPIServe(cmd *commander.Command, args []string) error {
|
||||
signal.Notify(sigchan, syscall.SIGINT, syscall.SIGTERM)
|
||||
go (func() {
|
||||
if _, ok := <-sigchan; ok {
|
||||
fmt.Printf("\nShutdown signal received, waiting for background tasks...\n")
|
||||
context.TaskList().Wait()
|
||||
server.Shutdown(stdcontext.Background())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user