Skip to content
This repository has been archived by the owner on Apr 22, 2021. It is now read-only.

Commit

Permalink
Check if there is a response before the 410 test
Browse files Browse the repository at this point in the history
  • Loading branch information
mdom committed Feb 27, 2016
1 parent 681c09a commit 2c10018
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/App/txtnix.pm
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ sub get_tweets {
? "$err->{code} response: $err->{message}"
: "Connection error: $err->{message}"
) . "\n";
if ( $tx->res->code == 410 and $self->rewrite_urls ) {
if ( $tx->res
&& $tx->res->code == 410
&& $self->rewrite_urls )
{
warn "Unfollow user $user after 410 response.\n";
delete $self->following->{$user};
}
Expand Down

0 comments on commit 2c10018

Please sign in to comment.