Move server shutdown into group.go.

This commit is contained in:
Juliusz Chroboczek committed 2021-09-11 15:42:14 +02:00
1 parent 184bd30077
commit c860fb96a3
2 files changed
+7 -6

No files matched your search

+1 -4
View File
@@ -70,10 +70,7 @@ func Serve(address string, dataDir string) error {
}
}
s.RegisterOnShutdown(func() {
group.Range(func(g *group.Group) bool {
go g.Shutdown("server is shutting down")
return true
})
group.Shutdown("server is shutting down")
})
server.Store(s)