1
This commit is contained in:
parent
81f3b0f0a3
commit
f6facb7f2e
@ -75,6 +75,7 @@ void MasterMgr::_SS_MS_ResponseTargetServer(f8::MsgHdr* hdr, const ss::SS_MS_Res
|
|||||||
);
|
);
|
||||||
if (!conn.expired()) {
|
if (!conn.expired()) {
|
||||||
conn.lock()->ForwardClientMsgEx(req->hdr_copy);
|
conn.lock()->ForwardClientMsgEx(req->hdr_copy);
|
||||||
|
f8::MsgHdr::Destroy(req->hdr_copy);
|
||||||
req->conn = conn;
|
req->conn = conn;
|
||||||
req->hdr_copy = nullptr;
|
req->hdr_copy = nullptr;
|
||||||
if (!req->timer_wp.expired()) {
|
if (!req->timer_wp.expired()) {
|
||||||
|
@ -137,10 +137,6 @@ void UpStream::ForwardClientMsgEx(f8::MsgHdr* hdr)
|
|||||||
SendStockMsg();
|
SendStockMsg();
|
||||||
}
|
}
|
||||||
ForwardClientMsg(hdr);
|
ForwardClientMsg(hdr);
|
||||||
if (hdr->buf) {
|
|
||||||
free((char*)hdr->buf);
|
|
||||||
}
|
|
||||||
free(hdr);
|
|
||||||
} else {
|
} else {
|
||||||
AddStockMsg(hdr->socket_handle, 0, nullptr, hdr);
|
AddStockMsg(hdr->socket_handle, 0, nullptr, hdr);
|
||||||
}
|
}
|
||||||
@ -266,13 +262,17 @@ void UpStream::CheckAlive()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void UpStream::AddStockMsg(unsigned short socket_handle, int msgid, ::google::protobuf::Message* msg,
|
void UpStream::AddStockMsg(unsigned short socket_handle, int msgid, ::google::protobuf::Message* msg,
|
||||||
f8::MsgHdr* hdr)
|
f8::MsgHdr* hdr)
|
||||||
{
|
{
|
||||||
UpStreamMsgNode* node = new UpStreamMsgNode();
|
UpStreamMsgNode* node = new UpStreamMsgNode();
|
||||||
node->socket_handle = socket_handle;
|
node->socket_handle = socket_handle;
|
||||||
node->msgid = msgid;
|
node->msgid = msgid;
|
||||||
node->msg = msg;
|
node->msg = msg;
|
||||||
node->hdr = hdr;
|
if (hdr) {
|
||||||
|
node->hdr = hdr->Clone();
|
||||||
|
} else {
|
||||||
|
node->hdr = nullptr;
|
||||||
|
}
|
||||||
if (bot_node_) {
|
if (bot_node_) {
|
||||||
bot_node_->next_node = node;
|
bot_node_->next_node = node;
|
||||||
bot_node_ = node;
|
bot_node_ = node;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user