From: Radoslaw Zarzynski Date: Tue, 5 Jul 2022 18:12:31 +0000 (+0000) Subject: crimson/osd: improve assertions around Connection::user_private X-Git-Tag: v18.0.0~563^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0200e22cc245176b154981201e1235f1a4dfc66b;p=ceph.git crimson/osd: improve assertions around Connection::user_private Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/crimson/net/Connection.h b/src/crimson/net/Connection.h index e715d059a5ee..95d7d807fa0f 100644 --- a/src/crimson/net/Connection.h +++ b/src/crimson/net/Connection.h @@ -157,10 +157,11 @@ public: return user_private != nullptr; } void set_user_private(std::unique_ptr new_user_private) { + assert(!has_user_private()); user_private = std::move(new_user_private); } user_private_t &get_user_private() { - ceph_assert(user_private); + assert(has_user_private()); return *user_private; } };