msg/async: keep connection alive only actually sending 24301/head
authorKefu Chai <kchai@redhat.com>
Thu, 27 Sep 2018 12:40:22 +0000 (20:40 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 27 Sep 2018 12:40:30 +0000 (20:40 +0800)
When connection stuck into odd state, we need to let connection timeout.
If send_message could update last_active, it won't play the role as
expected.
So we move last_active updated to the place actually should.

Signed-off-by: Haomai Wang <haomai@xsky.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/msg/async/AsyncConnection.cc

index cf2110d92a541a681085d00f787bc7f3a537b4f6..6e42ad95ecbc454303946601a7bcb5d283fcdbcf 100644 (file)
@@ -513,7 +513,6 @@ int AsyncConnection::send_message(Message *m)
     return 0;
   }
 
-  last_active = ceph::coarse_mono_clock::now();
   // we don't want to consider local message here, it's too lightweight which
   // may disturb users
   logger->inc(l_msgr_send_messages);