]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
msg/async/ProtocolV2: send_keepalive under the scope of lock
authorxie xingguo <xie.xingguo@zte.com.cn>
Fri, 1 Mar 2019 01:33:14 +0000 (09:33 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 1 Mar 2019 01:38:27 +0000 (09:38 +0800)
commitdee0e1ed67b8fe6054805f6ba73e7926a704ce77
tree6b47f365ccb1271df994fcb16d00b1f65996ddaf
parent61b9432ef9a3847eceb96f8d5a854567c49bbf61
msg/async/ProtocolV2: send_keepalive under the scope of lock

Dropping lock is dangerous and could be race-prone.
Any time the lock is dropped we need to reverify the connection state.

send_keepalive under the scope of lock should be just fine since
it does not introduce any extra lock dependencies.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/msg/async/ProtocolV2.cc