mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-10-21 10:58:23 +00:00
Make HTTP server wait for tasks before shutdown
This commit is contained in:
1 parent
74364544c2
commit
8436001d5b
3 files changed
+6
-5
No files matched your search
@@ -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 {
|
||||
context.TaskList().Wait()
|
||||
server.Shutdown(stdcontext.Background())
|
||||
}
|
||||
})()
|
||||
|
||||
Reference in new issue
Block a user