From: Casey Bodley Date: Fri, 31 Aug 2018 18:04:41 +0000 (-0400) Subject: crimson/net: fix error category equivalence checks X-Git-Tag: v14.0.1~408^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c48de27480e9624798df9f1840ecbb72570aede0;p=ceph.git crimson/net: fix error category equivalence checks consult base class for equivalence (which will match errors within this category) before applying the extra error code mappings Signed-off-by: Casey Bodley --- diff --git a/src/crimson/net/Errors.cc b/src/crimson/net/Errors.cc index e83c7c030ea0..62d60ce1c7bd 100644 --- a/src/crimson/net/Errors.cc +++ b/src/crimson/net/Errors.cc @@ -63,6 +63,9 @@ const std::error_category& net_category() } bool equivalent(int code, const std::error_condition& cond) const noexcept override { + if (error_category::equivalent(code, cond)) { + return true; + } switch (static_cast(code)) { case error::connection_aborted: return cond == std::errc::connection_aborted @@ -79,6 +82,9 @@ const std::error_category& net_category() } bool equivalent(const std::error_code& code, int cond) const noexcept override { + if (error_category::equivalent(code, cond)) { + return true; + } switch (static_cast(cond)) { case error::connection_aborted: return code == std::errc::connection_aborted