Skip to content
Browse files

Update lib/Cassandra/Pool.pm

  • Loading branch information...
1 parent 3f320e0 commit 269b4e781ab4bb5ff746430968c5049619d5eb05 @fmgoncalves committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Cassandra/Pool.pm
View
4 lib/Cassandra/Pool.pm
@@ -59,7 +59,7 @@ sub new {
sub add_pool {
my ($self, $keyspace,@nodes) = @_;
- $keyspace = $keyspace || $self->{rcp_opts}->{keyspace} || croak "No keyspace specified";
+ $keyspace = $keyspace || $self->{rcp_opts}->{keyspace};
croak "No nodes specified" unless scalar @nodes;
foreach ( @nodes) {
next if $self->{rcp_opts}->{server_name} eq $_;
@@ -76,7 +76,7 @@ sub add_pool {
sub add_pool_from_ring {
my $self = shift;
- my $keyspace = shift || $self->{rcp_opts}->{keyspace} || croak "No keyspace specified";
+ my $keyspace = shift || $self->{rcp_opts}->{keyspace};
if ($keyspace) {
my @nodes = @{ $self->{pool}->get()->describe_ring($keyspace) };
my @nodes_ips = map { map { split( /\//, $_ ) } @{ $_->{rpc_endpoints} } } @nodes;

0 comments on commit 269b4e7

Please sign in to comment.
Something went wrong with that request. Please try again.