Skip to content

Commit

Permalink
use latest IOLoop API
Browse files Browse the repository at this point in the history
  • Loading branch information
und3f committed Jun 18, 2012
1 parent bf7d34a commit 181426f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile.PL
Expand Up @@ -16,7 +16,7 @@ WriteMakefile(

BUILD_REQUIRES => {'Test::More' => '0.88'},
PREREQ_PM => {
'Mojolicious' => '1.22',
'Mojolicious' => '2.80',
'Protocol::Redis' => '1.0',
'Encode' => 0,
},
Expand Down
6 changes: 3 additions & 3 deletions lib/MojoX/Redis.pm
Expand Up @@ -76,7 +76,7 @@ sub DESTROY {
return unless my $loop = $self->ioloop;

# Cleanup connection
$loop->drop($self->{_connection})
$loop->remove($self->{_connection})
if $self->{_connection};
}

Expand All @@ -85,7 +85,7 @@ sub connect {

# drop old connection
if ($self->connected) {
$self->ioloop->drop($self->{_connection});
$self->ioloop->remove($self->{_connection});
}

$self->server =~ m{^([^:]+)(:(\d+))?};
Expand Down Expand Up @@ -135,7 +135,7 @@ sub connect {
$self->_inform_queue;

$self->on_error->($self);
$self->ioloop->drop($self->{_connection});
$self->ioloop->remove($self->{_connection});
}
);

Expand Down
2 changes: 1 addition & 1 deletion t/redis.t
Expand Up @@ -140,7 +140,7 @@ sub check4 {
$curr_stream->once(
read => sub {
my ($stream, $chunk) = @_;
Mojo::IOLoop->drop($server);
Mojo::IOLoop->remove($server);
}
);

Expand Down

0 comments on commit 181426f

Please sign in to comment.