Fix ProtocolMessage's move constructor and assignment.

This commit is contained in:
Xie Han
2024-08-19 17:43:01 +08:00
parent ee99634da4
commit 65dde8597d

View File

@@ -115,6 +115,8 @@ public:
message.size_limit = (size_t)-1;
this->attachment = message.attachment;
message.attachment = NULL;
this->wrapper = message.wrapper;
message.wrapper = NULL;
}
ProtocolMessage& operator = (ProtocolMessage&& message)
@@ -126,6 +128,8 @@ public:
delete this->attachment;
this->attachment = message.attachment;
message.attachment = NULL;
this->wrapper = message.wrapper;
message.wrapper = NULL;
}
return *this;