1
0
mirror of https://github.com/matrix-org/dendrite.git synced 2024-06-14 04:56:41 +00:00

Defer cancel on shutdown context

This commit is contained in:
Neil Alexander 2022-04-27 15:06:20 +01:00
parent cafa2853c5
commit 103795d33a
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -472,7 +472,7 @@ func (b *BaseDendrite) SetupAndServeHTTP(
b.WaitForShutdown()
ctx, cancel := context.WithCancel(context.Background())
cancel()
defer cancel()
_ = internalServ.Shutdown(ctx)
_ = externalServ.Shutdown(ctx)