From ee99634da4ff8e48553c3dc1f5191c96165c314a Mon Sep 17 00:00:00 2001 From: Xie Han <63350856@qq.com> Date: Mon, 19 Aug 2024 17:22:40 +0800 Subject: [PATCH] Fix ComplexClientTask::clear_resp(). --- src/factory/WFTaskFactory.inl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/factory/WFTaskFactory.inl b/src/factory/WFTaskFactory.inl index acd786e5..c9a15c5d 100644 --- a/src/factory/WFTaskFactory.inl +++ b/src/factory/WFTaskFactory.inl @@ -161,11 +161,11 @@ protected: void clear_resp() { - size_t size = this->resp.get_size_limit(); + protocol::ProtocolMessage msg(std::move(this->resp)); this->resp.~RESP(); - new(&this->resp) RESP(); - this->resp.set_size_limit(size); + new(&this->resp) RESP; + *(protocol::ProtocolMessage *)&this->resp = std::move(msg); } void disable_retry()