Fix ComplexClientTask::clear_resp().

This commit is contained in:
Xie Han
2024-08-19 17:22:40 +08:00
parent 5766424c4d
commit ee99634da4

View File

@@ -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()