mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-30 02:43:05 +00:00
Add timeouts for the Noise server
This commit is contained in:
parent
9a1438d2e3
commit
c1c36036ae
1 changed files with 3 additions and 1 deletions
4
noise.go
4
noise.go
|
@ -31,7 +31,9 @@ func (h *Headscale) NoiseUpgradeHandler(
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
server := http.Server{}
|
server := http.Server{
|
||||||
|
ReadTimeout: HTTPReadTimeout,
|
||||||
|
}
|
||||||
server.Handler = h2c.NewHandler(h.noiseMux, &http2.Server{})
|
server.Handler = h2c.NewHandler(h.noiseMux, &http2.Server{})
|
||||||
err = server.Serve(netutil.NewOneConnListener(noiseConn, nil))
|
err = server.Serve(netutil.NewOneConnListener(noiseConn, nil))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue