Skip to content

Commit

Permalink
fix(split): message header should not be empty (#725)
Browse files Browse the repository at this point in the history
  • Loading branch information
hycdong authored Jan 18, 2021
1 parent 20b2dfc commit bd254db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/rpc/rpc_message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ message_ex *message_ex::copy_message_no_reply(const message_ex &old_msg)
static_cast<char *>(dsn::tls_trans_malloc(sizeof(message_header))),
[](char *c) { dsn::tls_trans_free(c); });
msg->header = reinterpret_cast<message_header *>(header_holder.get());
msg->header = {}; // initialize to empty struct
memset(static_cast<void *>(msg->header), 0, sizeof(message_header));
msg->buffers.emplace_back(blob(std::move(header_holder), sizeof(message_header)));

if (old_msg.buffers.size() == 1) {
Expand Down

0 comments on commit bd254db

Please sign in to comment.