summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-09-28 19:37:20 +0200
committerDaniel Friesel <derf@finalrewind.org>2022-09-28 19:37:20 +0200
commit9f06b52a0043bbc5a6150f4efcef975b22359b44 (patch)
tree032db572f770406614cd38633687c727d1a4a835 /lib
parent383ec3feb305645a63cc03b6f0f1b8cf8c3fd368 (diff)
get_connecting_trains_p: leave loops when done
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Travelynx/Controller/Traveling.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm
index 9534912..100e88d 100755
--- a/lib/Travelynx/Controller/Traveling.pm
+++ b/lib/Travelynx/Controller/Traveling.pm
@@ -279,7 +279,7 @@ sub get_connecting_trains_p {
eval {
for my $iris_train (@iris_trains) {
if ( $iris_train->[0]->departure_is_cancelled ) {
- continue;
+ next;
}
for my $hafas_train (@hafas_trains) {
if ( $hafas_train->{line}{fahrtNr}
@@ -304,8 +304,10 @@ sub get_connecting_trains_p {
$iris_train->[2]->add( minutes =>
$iris_train->[0]->arrival_delay );
}
+ last;
}
}
+ last;
}
}
}