aboutsummaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-04-27 15:01:57 +0100
committerNeil Alexander <neilalexander@users.noreply.github.com>2022-04-27 15:10:20 +0100
commitcafa2853c5d67b3dd4d247abdd1ad5806f0c951b (patch)
tree01644ff4cf993f568babe4b7dc0596232256495b /setup
parent655ac3e8fb83e1cb9b670ab420a0f661dc19786e (diff)
Use process context as base context for all HTTP
Diffstat (limited to 'setup')
-rw-r--r--setup/base/base.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/setup/base/base.go b/setup/base/base.go
index dbc5d239..51c43198 100644
--- a/setup/base/base.go
+++ b/setup/base/base.go
@@ -346,6 +346,9 @@ func (b *BaseDendrite) SetupAndServeHTTP(
Addr: string(externalAddr),
WriteTimeout: HTTPServerTimeout,
Handler: externalRouter,
+ BaseContext: func(_ net.Listener) context.Context {
+ return b.ProcessContext.Context()
+ },
}
internalServ := externalServ
@@ -361,6 +364,9 @@ func (b *BaseDendrite) SetupAndServeHTTP(
internalServ = &http.Server{
Addr: string(internalAddr),
Handler: h2c.NewHandler(internalRouter, internalH2S),
+ BaseContext: func(_ net.Listener) context.Context {
+ return b.ProcessContext.Context()
+ },
}
}