mirror of
https://github.com/tailscale/tailscale.git
synced 2025-07-30 07:43:42 +00:00
cmd/derper: set a write timeout
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
This commit is contained in:
parent
9cd899f83e
commit
efbb4f2b66
@ -119,6 +119,7 @@ func main() {
|
|||||||
letsEncrypt := tsweb.IsProd443(*addr)
|
letsEncrypt := tsweb.IsProd443(*addr)
|
||||||
|
|
||||||
s := derp.NewServer(key.Private(cfg.PrivateKey), log.Printf)
|
s := derp.NewServer(key.Private(cfg.PrivateKey), log.Printf)
|
||||||
|
s.WriteTimeout = 2 * time.Second
|
||||||
if *mbps != 0 {
|
if *mbps != 0 {
|
||||||
s.BytesPerSecond = (*mbps << 20) / 8
|
s.BytesPerSecond = (*mbps << 20) / 8
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user