mirror of
https://gitee.com/IrisVega/frp.git
synced 2024-11-01 22:31:29 +08:00
all: change heartbeat interval time
This commit is contained in:
parent
cdd79aee52
commit
f130886f69
@ -156,6 +156,7 @@ func startHeartBeat(c *conn.Conn) {
|
|||||||
for {
|
for {
|
||||||
time.Sleep(time.Duration(client.HeartBeatInterval) * time.Second)
|
time.Sleep(time.Duration(client.HeartBeatInterval) * time.Second)
|
||||||
if c != nil && !c.IsClosed() {
|
if c != nil && !c.IsClosed() {
|
||||||
|
log.Debug("Send heartbeat to server")
|
||||||
err = c.Write(string(request) + "\n")
|
err = c.Write(string(request) + "\n")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Send hearbeat to server failed! Err:%v", err)
|
log.Error("Send hearbeat to server failed! Err:%v", err)
|
||||||
@ -165,5 +166,5 @@ func startHeartBeat(c *conn.Conn) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.Debug("Heartbeat exit")
|
log.Debug("Heartbeat goroutine exit")
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ var (
|
|||||||
LogWay string = "console"
|
LogWay string = "console"
|
||||||
LogLevel string = "info"
|
LogLevel string = "info"
|
||||||
HeartBeatInterval int64 = 20
|
HeartBeatInterval int64 = 20
|
||||||
HeartBeatTimeout int64 = 60
|
HeartBeatTimeout int64 = 90
|
||||||
)
|
)
|
||||||
|
|
||||||
var ProxyClients map[string]*ProxyClient = make(map[string]*ProxyClient)
|
var ProxyClients map[string]*ProxyClient = make(map[string]*ProxyClient)
|
||||||
|
@ -28,7 +28,7 @@ var (
|
|||||||
LogFile string = "console"
|
LogFile string = "console"
|
||||||
LogWay string = "console" // console or file
|
LogWay string = "console" // console or file
|
||||||
LogLevel string = "info"
|
LogLevel string = "info"
|
||||||
HeartBeatTimeout int64 = 30
|
HeartBeatTimeout int64 = 90
|
||||||
UserConnTimeout int64 = 10
|
UserConnTimeout int64 = 10
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user