lichao
2021-06-23 c1e39e20ca42b21eeac8b5068fa1f921bf9a070f
box/tcp_connection.cpp
@@ -178,8 +178,17 @@
         send_buffer_ = imsg.content();
         async_write(socket_, Buffer(send_buffer_), TcpCBSize(*this, [this]() { Close(); }));
      };
      auto &scenter = *pscenter_;
      if (scenter->PassRemoteRequestToLocal(remote, head, body_content, onRecv)) {
      if (head.type() == kMsgTypePublish) {
         auto reply = MakeReply(eSuccess);
         auto rep_head = InitMsgHead(GetType(reply), scenter->id(), 0, head.msg_id());
         send_buffer_ = MsgI::Serialize(rep_head, reply);
         async_write(socket_, Buffer(send_buffer_), TcpCBSize(*this, [this]() { Close(); }));
         scenter->RemotePublish(head, body_content);
         return;
      } else if (scenter->PassRemoteRequestToLocal(remote, head, body_content, onRecv)) {
         return;
      } else {
         Close();