Default StreamTimeout to 300 seconds

This commit is contained in:
Andy Wang 2019-09-21 16:47:02 +01:00
parent 2c9bfc404c
commit 8c477fb2b5
1 changed files with 5 additions and 1 deletions

View File

@ -90,7 +90,11 @@ func (sta *State) ParseConfig(conf string) (err error) {
sta.LocalAPIRouter = manager.Router
}
sta.Timeout = time.Duration(preParse.StreamTimeout) * time.Second
if preParse.StreamTimeout == 0 {
sta.Timeout = time.Duration(300) * time.Second
} else {
sta.Timeout = time.Duration(preParse.StreamTimeout) * time.Second
}
redirAddr := preParse.RedirAddr
colonSep := strings.Split(redirAddr, ":")