aboutsummaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-04-27 15:06:20 +0100
committerNeil Alexander <neilalexander@users.noreply.github.com>2022-04-27 15:10:26 +0100
commit103795d33a09728d7619e73014d507505ff121e2 (patch)
tree79960eb8b8232c7101d3fbdf92e07769b621305a /setup
parentcafa2853c5d67b3dd4d247abdd1ad5806f0c951b (diff)
Defer cancel on shutdown context
Diffstat (limited to 'setup')
-rw-r--r--setup/base/base.go2
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)