瀏覽代碼

reduce ping frequency

v2ray 9 年之前
父節點
當前提交
d08ffedf48
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      transport/internet/kcp/connection.go

+ 1 - 1
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