mirror of
https://github.com/ehang-io/nps.git
synced 2025-09-01 02:46:52 +00:00
add custom client disconnect timeout option, close #485
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user