From f130886f69eb748d153c7de38f9b93f9ea4682e6 Mon Sep 17 00:00:00 2001 From: fatedier Date: Thu, 17 Mar 2016 10:25:23 +0800 Subject: [PATCH] all: change heartbeat interval time --- src/frp/cmd/frpc/control.go | 3 ++- src/frp/models/client/config.go | 2 +- src/frp/models/server/config.go | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/frp/cmd/frpc/control.go b/src/frp/cmd/frpc/control.go index bba7d0c..137be06 100644 --- a/src/frp/cmd/frpc/control.go +++ b/src/frp/cmd/frpc/control.go @@ -156,6 +156,7 @@ func startHeartBeat(c *conn.Conn) { for { time.Sleep(time.Duration(client.HeartBeatInterval) * time.Second) if c != nil && !c.IsClosed() { + log.Debug("Send heartbeat to server") err = c.Write(string(request) + "\n") if err != nil { log.Error("Send hearbeat to server failed! Err:%v", err) @@ -165,5 +166,5 @@ func startHeartBeat(c *conn.Conn) { break } } - log.Debug("Heartbeat exit") + log.Debug("Heartbeat goroutine exit") } diff --git a/src/frp/models/client/config.go b/src/frp/models/client/config.go index 363049c..e41fec8 100644 --- a/src/frp/models/client/config.go +++ b/src/frp/models/client/config.go @@ -29,7 +29,7 @@ var ( LogWay string = "console" LogLevel string = "info" HeartBeatInterval int64 = 20 - HeartBeatTimeout int64 = 60 + HeartBeatTimeout int64 = 90 ) var ProxyClients map[string]*ProxyClient = make(map[string]*ProxyClient) diff --git a/src/frp/models/server/config.go b/src/frp/models/server/config.go index 7bef192..b2eb63f 100644 --- a/src/frp/models/server/config.go +++ b/src/frp/models/server/config.go @@ -28,7 +28,7 @@ var ( LogFile string = "console" LogWay string = "console" // console or file LogLevel string = "info" - HeartBeatTimeout int64 = 30 + HeartBeatTimeout int64 = 90 UserConnTimeout int64 = 10 )