mirror of
https://github.com/matrix-org/dendrite
synced 2024-12-15 00:33:43 +01:00
Use process context as base context for all HTTP
This commit is contained in:
parent
655ac3e8fb
commit
cafa2853c5
1 changed files with 6 additions and 0 deletions
|
@ -346,6 +346,9 @@ func (b *BaseDendrite) SetupAndServeHTTP(
|
||||||
Addr: string(externalAddr),
|
Addr: string(externalAddr),
|
||||||
WriteTimeout: HTTPServerTimeout,
|
WriteTimeout: HTTPServerTimeout,
|
||||||
Handler: externalRouter,
|
Handler: externalRouter,
|
||||||
|
BaseContext: func(_ net.Listener) context.Context {
|
||||||
|
return b.ProcessContext.Context()
|
||||||
|
},
|
||||||
}
|
}
|
||||||
internalServ := externalServ
|
internalServ := externalServ
|
||||||
|
|
||||||
|
@ -361,6 +364,9 @@ func (b *BaseDendrite) SetupAndServeHTTP(
|
||||||
internalServ = &http.Server{
|
internalServ = &http.Server{
|
||||||
Addr: string(internalAddr),
|
Addr: string(internalAddr),
|
||||||
Handler: h2c.NewHandler(internalRouter, internalH2S),
|
Handler: h2c.NewHandler(internalRouter, internalH2S),
|
||||||
|
BaseContext: func(_ net.Listener) context.Context {
|
||||||
|
return b.ProcessContext.Context()
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue