]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/net: init h.global_seq during handshake
authorYingxin <yingxin.cheng@intel.com>
Thu, 30 Aug 2018 10:10:07 +0000 (18:10 +0800)
committerYingxin <yingxin.cheng@intel.com>
Tue, 4 Sep 2018 12:00:25 +0000 (20:00 +0800)
Signed-off-by: Yingxin <yingxin.cheng@intel.com>
src/crimson/net/SocketConnection.cc

index 24fcd6fab99a460b088af66c34bf47b70a19e6b2..c163273f8bd9dddb223c9f75007d3ae315eeee26 100644 (file)
@@ -526,9 +526,10 @@ seastar::future<>
 SocketConnection::send_connect_reply_ready(msgr_tag_t tag,
                                            bufferlist&& authorizer_reply)
 {
+  h.global_seq = get_messenger()->get_global_seq();
   h.reply.tag = tag;
   h.reply.features = policy.features_supported;
-  h.reply.global_seq = get_messenger()->get_global_seq();
+  h.reply.global_seq = h.global_seq;
   h.reply.connect_seq = h.connect_seq;
   h.reply.flags = 0;
   if (policy.lossy) {
@@ -820,6 +821,7 @@ seastar::future<> SocketConnection::client_handshake(entity_type_t peer_type,
       bufferlist bl;
       bl.append(buffer::create_static(banner_size, banner));
       ::encode(my_addr, bl, 0);
+      h.global_seq = get_messenger()->get_global_seq();
       return out.write(std::move(bl)).then([this] { return out.flush(); });
     }).then([=] {
       return seastar::do_until([=] { return state == state_t::open; },