Skip to content

Commit

Permalink
Don't warn on scroller deletion (GH#81)
Browse files Browse the repository at this point in the history
Failure to remove scroller will normally happen when the
scroller object goes out of scope after the server-side
scroller has timed-out and was removed.

Sending the DELETE is an act of politeness to help the
server cleaning up resources.

This warning doesn't add value to the user and apparently is
confusing.
  • Loading branch information
mickeyn committed Apr 16, 2017
1 parent 90e6f75 commit ec1c435
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Changes
@@ -1,5 +1,8 @@
Revision history for MetaCPAN-Client (previously MetaCPAN-API)

- -
* Removed warning of scroller deletion failure (Mickey, GH#81)

2.010000 3.4.17
* Added support for new 'permission' type (Mickey)

Expand Down
5 changes: 1 addition & 4 deletions lib/MetaCPAN/Client/Scroll.pm
Expand Up @@ -154,13 +154,10 @@ sub _fetch_next {
sub DEMOLISH {
my $self = shift;

my $res = $self->ua->delete(
$self->ua->delete(
sprintf( '%s/_search/scroll?scroll=%s', $self->base_url, $self->time ),
{ content => $self->_id }
);

warn "failed to delete scroller"
unless $res->{status} == 200;
}

1;
Expand Down

0 comments on commit ec1c435

Please sign in to comment.