diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2022-04-27 15:06:20 +0100 |
---|---|---|
committer | Neil Alexander <neilalexander@users.noreply.github.com> | 2022-04-27 15:10:26 +0100 |
commit | 103795d33a09728d7619e73014d507505ff121e2 (patch) | |
tree | 79960eb8b8232c7101d3fbdf92e07769b621305a /setup/base | |
parent | cafa2853c5d67b3dd4d247abdd1ad5806f0c951b (diff) |
Defer cancel on shutdown context
Diffstat (limited to 'setup/base')
-rw-r--r-- | setup/base/base.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/setup/base/base.go b/setup/base/base.go index 51c43198..03ea2ad7 100644 --- a/setup/base/base.go +++ b/setup/base/base.go @@ -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) |