1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-09 13:05:56 +00:00

new apps/switch (beta)

This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-08-17 21:53:17 +03:00
parent a61f743fa8
commit 589c8c6242
14 changed files with 678 additions and 48 deletions

View File

@@ -492,6 +492,9 @@ func (su *Supervisor) RegisterOnShutdown(cb func()) {
// for them to close, if desired.
func (su *Supervisor) Shutdown(ctx context.Context) error {
atomic.StoreUint32(&su.closedManually, 1) // future-use
if ctx == nil {
ctx = context.Background()
}
return su.Server.Shutdown(ctx)
}