From: Ricardo Dias Date: Fri, 23 Nov 2018 15:53:56 +0000 (+0000) Subject: msg/async: msgr2: check protocol state after fast dispatch X-Git-Tag: v14.1.0~271^2~38 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=da141adcad6b59de2691bbf44aacbaf010bda504;p=ceph.git msg/async: msgr2: check protocol state after fast dispatch Signed-off-by: Ricardo Dias --- diff --git a/src/msg/async/ProtocolV2.cc b/src/msg/async/ProtocolV2.cc index 91acf660ee1..41263a813c8 100644 --- a/src/msg/async/ProtocolV2.cc +++ b/src/msg/async/ProtocolV2.cc @@ -1946,6 +1946,14 @@ CtPtr ProtocolV2::handle_message_complete() { data.clear(); extra.clear(); + // we might have been reused by another connection + // let's check if that is the case + if (state != READY) { + // yes, that was the case, let's do nothing + return nullptr; + } + + if (need_dispatch_writer && connection->is_connected()) { connection->center->dispatch_event_external(connection->write_handler); }