mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-03-04 21:07:30 +00:00
Fix: use correctly last record
This commit is contained in:
@@ -114,11 +114,11 @@ func (p *Proxy) LastDelay() (delay uint16) {
|
||||
return max
|
||||
}
|
||||
|
||||
head := p.history.First()
|
||||
if head == nil {
|
||||
last := p.history.Last()
|
||||
if last == nil {
|
||||
return max
|
||||
}
|
||||
history := head.(C.DelayHistory)
|
||||
history := last.(C.DelayHistory)
|
||||
if history.Delay == 0 {
|
||||
return max
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user