From 32abea13971d1cd4ab52fd0800b114aed6226f03 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Fri, 27 Jan 2017 09:01:39 +0100 Subject: [PATCH] default freedom timeout to 600 --- tools/conf/freedom.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/conf/freedom.go b/tools/conf/freedom.go index e915973a..f4c89627 100644 --- a/tools/conf/freedom.go +++ b/tools/conf/freedom.go @@ -12,9 +12,9 @@ import ( ) type FreedomConfig struct { - DomainStrategy string `json:"domainStrategy"` - Timeout uint32 `json:"timeout"` - Redirect string `json:"redirect"` + DomainStrategy string `json:"domainStrategy"` + Timeout *uint32 `json:"timeout"` + Redirect string `json:"redirect"` } func (v *FreedomConfig) Build() (*serial.TypedMessage, error) { @@ -24,7 +24,10 @@ func (v *FreedomConfig) Build() (*serial.TypedMessage, error) { if domainStrategy == "useip" || domainStrategy == "use_ip" { config.DomainStrategy = freedom.Config_USE_IP } - config.Timeout = v.Timeout + config.Timeout = 600 + if v.Timeout != nil { + config.Timeout = *v.Timeout + } if len(v.Redirect) > 0 { host, portStr, err := net.SplitHostPort(v.Redirect) if err != nil {