mirror of
https://github.com/v2fly/v2ray-core
synced 2024-02-27 03:18:06 +00:00
nil pointer protection
This commit is contained in:
@@ -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
|
||||
this.onPacketLoss(rate)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user