Skip to content

Commit

Permalink
bugfix: once binlogsender disconnect with receiver, it will never rec…
Browse files Browse the repository at this point in the history
…onnect success
  • Loading branch information
KernelMaker committed May 19, 2017
1 parent cc88381 commit b202a0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pika_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,8 @@ bool PikaServer::ShouldAccessConnAsMaster(const std::string& ip) {
slash::RWLock l(&state_protector_, false);
DLOG(INFO) << "ShouldAccessConnAsMaster, repl_state_: " << repl_state_ << " ip: " << ip << " master_ip: " << master_ip_;
// if (repl_state_ != PIKA_REPL_NO_CONNECT && repl_state_ != PIKA_REPL_WAIT_DBSYNC && ip == master_ip_) {
if (repl_state_ == PIKA_REPL_CONNECTING && ip == master_ip_) {
if ((repl_state_ == PIKA_REPL_CONNECTING || repl_state_ == PIKA_REPL_CONNECTED) &&
ip == master_ip_) {
return true;
}
return false;
Expand Down

0 comments on commit b202a0c

Please sign in to comment.