]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/simple: behave when v2 and v1 addrs are present at target
authorSage Weil <sage@redhat.com>
Tue, 18 Dec 2018 13:17:12 +0000 (07:17 -0600)
committerSage Weil <sage@redhat.com>
Thu, 3 Jan 2019 17:17:31 +0000 (11:17 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/msg/simple/SimpleMessenger.cc

index aa39bd5e27c077f661b664d7c699acc37489ea84..1252e784449d48cb47c484a7b0ad7c13e4abc178 100644 (file)
@@ -436,11 +436,11 @@ ConnectionRef SimpleMessenger::connect_to(int type,
 
   // remote
   while (true) {
-    Pipe *pipe = _lookup_pipe(addrs.front());
+    Pipe *pipe = _lookup_pipe(addrs.legacy_addr());
     if (pipe) {
       ldout(cct, 10) << "get_connection " << addrs << " existing " << pipe << dendl;
     } else {
-      pipe = connect_rank(addrs.front(), type, NULL, NULL);
+      pipe = connect_rank(addrs.legacy_addr(), type, NULL, NULL);
       ldout(cct, 10) << "get_connection " << addrs << " new " << pipe << dendl;
     }
     Mutex::Locker l(pipe->pipe_lock);