]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
msg: correct read result check
authorChangcheng Liu <changcheng.liu@aliyun.com>
Thu, 30 Apr 2020 03:18:36 +0000 (11:18 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 26 Jul 2020 11:22:00 +0000 (19:22 +0800)
The "r >= 0" is checked under "r <= 0", so the right condition
is "r == 0".

Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
src/msg/async/ProtocolV2.cc

index 603a9a526e5decb78142d749364733e642cccd98..c23b71e9052a65a44ad777bc7624bab750318eec 100644 (file)
@@ -756,7 +756,7 @@ CtPtr ProtocolV2::read(CONTINUATION_RXBPTR_TYPE<ProtocolV2> &next,
     });
   if (r <= 0) {
     // error or done synchronously
-    if (unlikely(pre_auth.enabled) && r >= 0) {
+    if (unlikely(pre_auth.enabled) && r == 0) {
       pre_auth.rxbuf.append(*next.node);
       ceph_assert(!cct->_conf->ms_die_on_bug ||
                  pre_auth.rxbuf.length() < 1000000);