You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by gu...@apache.org on 2025/04/25 07:38:55 UTC
(brpc) branch master updated: Fix HttpResponseSenderAsDone Run with NULL messages (#2958)
This is an automated email from the ASF dual-hosted git repository.
guangmingchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brpc.git
The following commit(s) were added to refs/heads/master by this push:
new bf389c87 Fix HttpResponseSenderAsDone Run with NULL messages (#2958)
bf389c87 is described below
commit bf389c872a80ce287beed5c9965874ecd6a46306
Author: Bright Chen <ch...@foxmail.com>
AuthorDate: Fri Apr 25 15:38:50 2025 +0800
Fix HttpResponseSenderAsDone Run with NULL messages (#2958)
---
src/brpc/policy/http_rpc_protocol.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/brpc/policy/http_rpc_protocol.cpp b/src/brpc/policy/http_rpc_protocol.cpp
index 007bce39..374b1df9 100644
--- a/src/brpc/policy/http_rpc_protocol.cpp
+++ b/src/brpc/policy/http_rpc_protocol.cpp
@@ -811,8 +811,10 @@ class HttpResponseSenderAsDone : public google::protobuf::Closure {
public:
explicit HttpResponseSenderAsDone(HttpResponseSender* s) : _sender(std::move(*s)) {}
void Run() override {
- _sender._cntl->CallAfterRpcResp(
- _sender._messages->Request(), _sender._messages->Response());
+ if (NULL != _sender._messages) {
+ _sender._cntl->CallAfterRpcResp(_sender._messages->Request(),
+ _sender._messages->Response());
+ }
delete this;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org