fix: address code review findings
This commit is contained in:
@@ -1068,7 +1068,7 @@ func (g *Graph) checkRouteForChanges(itinerary *Itinerary) bool {
|
||||
break
|
||||
}
|
||||
// Check for significant delay (more than 2x normal duration)
|
||||
if edge.Duration > leg.Cost*2 && leg.Cost > 0 { // simplified delay check
|
||||
if edge.Duration > leg.Duration*2 && leg.Duration > 0 {
|
||||
if !needsReSearch || itinerary.ReSearchReason == string(reasonNone) {
|
||||
needsReSearch = true
|
||||
itinerary.NeedsReSearch = true
|
||||
|
||||
Reference in New Issue
Block a user