add custom client disconnect timeout option, close #485

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

No files matched your search

+5 -1
View File
@@ -205,5 +205,9 @@ func run() {
crypt.InitTls()
tool.InitAllowPort()
tool.StartSystemInfo()
go server.StartNewServer(bridgePort, task, beego.AppConfig.String("bridge_type"))
timeout, err := beego.AppConfig.Int("disconnect_timeout")
if err != nil {
timeout = 60
}
go server.StartNewServer(bridgePort, task, beego.AppConfig.String("bridge_type"), timeout)
}