summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/IRIS.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-05-03 22:50:08 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-05-03 22:50:08 +0200
commit717107cb49ba108553873ba2f1ff49be7127d9ce (patch)
tree6475e9f84e3f4c7eb5f0d0634d01fd1dcf06e106 /lib/Travel/Status/DE/IRIS.pm
parent19eb0205c65f7c96975c7aae2926ba68b7c424dd (diff)
Do not perform transfer processing for child requests to related stations
This fixes transfer trains getting lost when requested from a related station Notable offender: "Berlin Südkreuz" lacked S 41 / S42 (ring line from Südkreuz (S) to Südkreuz (S) with transfer to/from the next/previous incarnation), as it referenced "Berlin Südkreuz (S)". "Berlin Südkreuz (S)" itself worked fine.
Diffstat (limited to 'lib/Travel/Status/DE/IRIS.pm')
-rw-r--r--lib/Travel/Status/DE/IRIS.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/IRIS.pm b/lib/Travel/Status/DE/IRIS.pm
index 9cf912f..9ea31a2 100644
--- a/lib/Travel/Status/DE/IRIS.pm
+++ b/lib/Travel/Status/DE/IRIS.pm
@@ -81,6 +81,12 @@ sub new {
$self->{related_stations} = \@related_stations;
for my $ref (@related_stations) {
+
+ # We (the parent) perform transfer processing, so child requests must not
+ # do it themselves. Otherwise, trains from child requests will be
+ # processed twice and may be lost.
+ # Similarly, child requests must not perform requests to related
+ # stations -- we're already doing that right now.
my $ref_status = Travel::Status::DE::IRIS->new(
datetime => $self->{datetime},
developer_mode => $self->{developer_mode},
@@ -92,6 +98,7 @@ sub new {
realtime_cache => $self->{rt_cache},
strptime_obj => $self->{strptime_obj},
user_agent => $self->{user_agent},
+ keep_transfers => 1,
with_related => 0,
);
if ( not $ref_status->errstr ) {