This is an automated email from the ASF dual-hosted git repository.
earthchen pushed a commit to branch 3.2
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.2 by this push:
new df0241b6dd fix npe (#11830)
df0241b6dd is described below
commit df0241b6dde0463517be3f5fd6968ea0a2dd9cf0
Author: icodening <[email protected]>
AuthorDate: Wed Mar 15 14:03:44 2023 +0800
fix npe (#11830)
* fix npe
* fix npe
---
.../org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCall.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git
a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCall.java
b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCall.java
index 01ea3a1e79..c385f46bd1 100644
---
a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCall.java
+++
b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCall.java
@@ -178,6 +178,11 @@ public abstract class AbstractServerCall implements
ServerCall, ServerStream.Lis
// It will enter here when there is an error in the header
return;
}
+ //Both 'onError' and 'onComplete' are termination operators.
+ // The stream will be closed when 'onError' was called, and
'onComplete' is not allowed to be called again.
+ if (isClosed()) {
+ return;
+ }
listener.onComplete();
}