mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-02-20 23:47:21 -05:00
nil pointer protection
This commit is contained in:
parent
0caf2e6d30
commit
2f0d602833
@ -165,7 +165,7 @@ func (this *SendingWindow) Flush(current uint32, resend uint32, rto uint32, maxI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if inFlightSize > 0 && this.totalInFlightSize != 0 {
|
if this.onPacketLoss != nil && inFlightSize > 0 && this.totalInFlightSize != 0 {
|
||||||
rate := lost * 100 / this.totalInFlightSize
|
rate := lost * 100 / this.totalInFlightSize
|
||||||
this.onPacketLoss(rate)
|
this.onPacketLoss(rate)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user