Skip to content

Commit

Permalink
Fix compiling error when message doesn't have a move constructor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Barenboim committed Jan 6, 2025
1 parent 427ad1e commit d9186d1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/factory/WFTaskFactory.inl
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,10 @@ protected:

void clear_resp()
{
RESP resp;
*(protocol::ProtocolMessage *)&resp = std::move(this->resp);
this->resp = std::move(resp);
protocol::ProtocolMessage head(std::move(this->resp));
this->resp.~RESP();
new(&this->resp) RESP;
*(protocol::ProtocolMessage *)&this->resp = std::move(head);
}

void disable_retry()
Expand Down

0 comments on commit d9186d1

Please sign in to comment.