From d08ffedf481a0544fc54a0ef3420e7328ba119bf Mon Sep 17 00:00:00 2001 From: v2ray Date: Sat, 20 Aug 2016 11:33:22 +0200 Subject: [PATCH] reduce ping frequency --- transport/internet/kcp/connection.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport/internet/kcp/connection.go b/transport/internet/kcp/connection.go index 0c9b8d84..1d8cf944 100644 --- a/transport/internet/kcp/connection.go +++ b/transport/internet/kcp/connection.go @@ -512,7 +512,7 @@ func (this *Connection) flush() { this.receivingWorker.Flush(current) this.sendingWorker.Flush(current) - if this.sendingWorker.PingNecessary() || this.receivingWorker.PingNecessary() || current-atomic.LoadUint32(&this.lastPingTime) >= 5000 { + if this.sendingWorker.PingNecessary() || this.receivingWorker.PingNecessary() || current-atomic.LoadUint32(&this.lastPingTime) >= 3000 { seg := NewCmdOnlySegment() seg.Conv = this.conv seg.Command = CommandPing