Explorar o código

reduce ping frequency

v2ray %!s(int64=9) %!d(string=hai) anos
pai
achega
d08ffedf48
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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