mirror of
https://github.com/matrix-org/dendrite
synced 2024-12-15 03:23:46 +01:00
Defer cancel on shutdown context
This commit is contained in:
parent
cafa2853c5
commit
103795d33a
1 changed files with 1 additions and 1 deletions
|
@ -472,7 +472,7 @@ func (b *BaseDendrite) SetupAndServeHTTP(
|
||||||
b.WaitForShutdown()
|
b.WaitForShutdown()
|
||||||
|
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
cancel()
|
defer cancel()
|
||||||
|
|
||||||
_ = internalServ.Shutdown(ctx)
|
_ = internalServ.Shutdown(ctx)
|
||||||
_ = externalServ.Shutdown(ctx)
|
_ = externalServ.Shutdown(ctx)
|
||||||
|
|
Loading…
Reference in a new issue