Skip to content

Commit ff925a2

Browse files
committed
The client now disconnects if the E_NO_AUTH error was returned
1 parent f68996e commit ff925a2

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

Changes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Revision history for AnyEvent::RipeRedis.
22

3+
0.46 Tue Dec 5 15:56:58 MSK 2017
4+
- The client now disconnects if the E_NO_AUTH error was returned.
5+
36
0.44 Fri Dec 1 12:09:02 MSK 2017
47
- Made that the client do not reconnects on the error
58
"Client sent AUTH, but no password is set".

lib/AnyEvent/RipeRedis.pm

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use strict;
55
use warnings;
66
use base qw( Exporter );
77

8-
our $VERSION = '0.44';
8+
our $VERSION = '0.46';
99

1010
use AnyEvent::RipeRedis::Error;
1111

@@ -753,6 +753,13 @@ sub _process_error {
753753
return;
754754
}
755755

756+
if ( $err_code == E_NO_AUTH ) {
757+
my $err = _new_error( $reply, $err_code );
758+
$self->_disconnect($err);
759+
760+
return;
761+
}
762+
756763
if ( $cmd->{name} eq 'eval_cached'
757764
&& $err_code == E_NO_SCRIPT )
758765
{

lib/AnyEvent/RipeRedis/Error.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use 5.008000;
44
use strict;
55
use warnings;
66

7-
our $VERSION = '0.44';
7+
our $VERSION = '0.46';
88

99
our %ERROR_CODES = (
1010
E_CANT_CONN => 1,

0 commit comments

Comments
 (0)