]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
msg/async: msgr2: check protocol state after fast dispatch
authorRicardo Dias <rdias@suse.com>
Fri, 23 Nov 2018 15:53:56 +0000 (15:53 +0000)
committerRicardo Dias <rdias@suse.com>
Wed, 23 Jan 2019 13:59:26 +0000 (13:59 +0000)
Signed-off-by: Ricardo Dias <rdias@suse.com>
src/msg/async/ProtocolV2.cc

index 91acf660ee1b15f4dd183454b298f69465af5232..41263a813c8f6a86dc989d88f0a5b85e1224d799 100644 (file)
@@ -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);
   }