diff --git a/lib/Catalyst/Plugin/NGCP/Redis.pm b/lib/Catalyst/Plugin/NGCP/Redis.pm index 2872f0f276..63a48e818c 100644 --- a/lib/Catalyst/Plugin/NGCP/Redis.pm +++ b/lib/Catalyst/Plugin/NGCP/Redis.pm @@ -50,7 +50,8 @@ sub _wait_for_master_role { my $wait = 5; while ($cnt < $wait) { - return 1 if _get_replication_role($conn_ref) eq 'master'; + my $repl_role = _get_replication_role($conn_ref); + return 1 if $repl_role =~ /^(master|active-replica)$/; sleep $interval; $cnt += $interval; }