From: Samuel Just Date: Thu, 30 May 2019 00:32:14 +0000 (-0700) Subject: crimson/net/ProtocolV1: close connection when replaced X-Git-Tag: v15.1.0~2580^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c5fec5f7bd2b14d53b7d7ea996a2ee6d7826464d;p=ceph.git crimson/net/ProtocolV1: close connection when replaced Signed-off-by: Samuel Just --- diff --git a/src/crimson/net/ProtocolV1.cc b/src/crimson/net/ProtocolV1.cc index 668ad7c5c517..7e8f7e18c24a 100644 --- a/src/crimson/net/ProtocolV1.cc +++ b/src/crimson/net/ProtocolV1.cc @@ -455,7 +455,6 @@ seastar::future ProtocolV1::replace_existing( } else { reply_tag = CEPH_MSGR_TAG_READY; } - messenger.unregister_conn(existing); if (!existing->is_lossy()) { // reset the in_seq if this is a hard reset from peer, // otherwise we respect our original connection's value @@ -464,6 +463,11 @@ seastar::future ProtocolV1::replace_existing( existing->requeue_sent(); std::tie(conn.out_seq, conn.out_q) = existing->get_out_queue(); } + seastar::do_with( + std::move(existing), + [](auto existing) { + return existing->close(); + }); return send_connect_reply_ready(reply_tag, std::move(authorizer_reply)); }