From 9cc1055eb6e18d55084d5af2b2f93eb8da5ab7da Mon Sep 17 00:00:00 2001 From: Haomai Wang Date: Wed, 2 Sep 2015 18:59:08 +0800 Subject: [PATCH] AsyncConnection: Close connection when unregistered connection met WAIT Fix #12912 Signed-off-by: Haomai Wang --- src/msg/async/AsyncConnection.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/msg/async/AsyncConnection.cc b/src/msg/async/AsyncConnection.cc index b0433e81f8850..cf58a6ea8aa19 100644 --- a/src/msg/async/AsyncConnection.cc +++ b/src/msg/async/AsyncConnection.cc @@ -1506,6 +1506,10 @@ int AsyncConnection::handle_connect_reply(ceph_msg_connect &connect, ceph_msg_co } if (reply.tag == CEPH_MSGR_TAG_WAIT) { ldout(async_msgr->cct, 3) << __func__ << " connect got WAIT (connection race)" << dendl; + if (!once_ready) { + ldout(async_msgr->cct, 1) << __func__ << " got WAIT while connection isn't registered, just closed." << dendl; + goto fail; + } state = STATE_WAIT; } -- 2.39.5