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 <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to