add custom client disconnect timeout option, close #485

This commit is contained in:
ffdfgdfg
2020-05-07 23:29:45 +08:00
parent 6f1b32a152
commit f459acdfb4
15 changed files with 89 additions and 60 deletions

View File

@@ -17,6 +17,7 @@ type CommonConfig struct {
AutoReconnection bool
ProxyUrl string
Client *file.Client
DisconnectTime int
}
type LocalServer struct {
@@ -147,6 +148,8 @@ func dealCommon(s string) *CommonConfig {
c.Client.Remark = item[1]
case "pprof_addr":
common.InitPProfFromArg(item[1])
case "disconnect_timeout":
c.DisconnectTime = common.GetIntNoErrByStr(item[1])
}
}
return c