summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Helper
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travelynx/Helper')
-rw-r--r--lib/Travelynx/Helper/DBDB.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Travelynx/Helper/DBDB.pm b/lib/Travelynx/Helper/DBDB.pm
index 3f181f6..030fbf6 100644
--- a/lib/Travelynx/Helper/DBDB.pm
+++ b/lib/Travelynx/Helper/DBDB.pm
@@ -116,6 +116,7 @@ sub get_stationinfo_p {
my ($tx) = @_;
if ( my $err = $tx->error ) {
+ $cache->freeze( $url, {} );
$promise->reject("HTTP $err->{code} $err->{message}");
return;
}
@@ -128,6 +129,7 @@ sub get_stationinfo_p {
)->catch(
sub {
my ($err) = @_;
+ $cache->freeze( $url, {} );
$promise->reject($err);
return;
}