]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MgrMonitor: break loop on catching specified standby
authorxie xingguo <xie.xingguo@zte.com.cn>
Sun, 9 Oct 2016 02:44:33 +0000 (10:44 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Mon, 17 Oct 2016 13:00:08 +0000 (21:00 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/mon/MgrMonitor.cc

index 1effc775e464867e010f38c133ac533e89d466fc..d6a3a9acac946ee558665072049ab3f43393d893 100644 (file)
@@ -421,6 +421,7 @@ bool MgrMonitor::prepare_command(MonOpRequestRef op)
         for (const auto &i : pending_map.standbys) {
           if (i.second.name == who) {
             gid = i.first;
+            break;
           }
         }
         if (gid != 0) {