cmd/derper: set a write timeout

Signed-off-by: David Crawshaw <[email protected]>
This commit is contained in:
David Crawshaw committed 2020-03-12 12:20:01 -04:00
1 parent 9cd899f83e
commit efbb4f2b66
1 file changed
+1
+1
View File
@@ -119,6 +119,7 @@ func main() {
letsEncrypt := tsweb.IsProd443(*addr)
s := derp.NewServer(key.Private(cfg.PrivateKey), log.Printf)
s.WriteTimeout = 2 * time.Second
if *mbps != 0 {
s.BytesPerSecond = (*mbps << 20) / 8
}