This is an automated email from the ASF dual-hosted git repository.
earthchen pushed a commit to branch 3.1
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.1 by this push:
new 4f6528fb86 Call onClose() when deser error (#11838)
4f6528fb86 is described below
commit 4f6528fb86a843b2308167ffd1e5faac22e33a4b
Author: GuoHao <[email protected]>
AuthorDate: Thu Mar 16 10:23:19 2023 +0800
Call onClose() when deser error (#11838)
---
.../org/apache/dubbo/rpc/protocol/tri/call/TripleClientCall.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/TripleClientCall.java
b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/TripleClientCall.java
index a7d5e39d80..4ee3512adf 100644
---
a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/TripleClientCall.java
+++
b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/TripleClientCall.java
@@ -74,8 +74,10 @@ public class TripleClientCall implements ClientCall,
ClientStream.Listener {
final Object unpacked =
requestMetadata.packableMethod.parseResponse(message);
listener.onMessage(unpacked);
} catch (Throwable t) {
- cancelByLocal(TriRpcStatus.INTERNAL.withDescription("Deserialize
response failed")
- .withCause(t).asException());
+ TriRpcStatus status =
TriRpcStatus.INTERNAL.withDescription("Deserialize response failed")
+ .withCause(t);
+ cancelByLocal(status.asException());
+ listener.onClose(status,null);
LOGGER.error(PROTOCOL_FAILED_RESPONSE, "", "",
String.format("Failed to deserialize triple response, service=%s,
method=%s,connection=%s",
connection, requestMetadata.service,
requestMetadata.method.getMethodName()), t);
}