msg/simple: behave when v2 and v1 addrs are present at target

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2018-12-18 07:17:12 -06:00
parent 609c6d76bc
commit a1cebd00a9

View 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);