Skip to content

Commit d5c5176

Browse files
beiwei30chickenlj
authored andcommitted
port #3568 into main trunk (#3993)
fixes #3991
1 parent 09d8a6e commit d5c5176

File tree

1 file changed

+3
-1
lines changed
  • dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo

1 file changed

+3
-1
lines changed

dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboCodec.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,13 @@ protected Object decodeBody(Channel channel, InputStream is, byte[] header) thro
7373
byte status = header[3];
7474
res.setStatus(status);
7575
try {
76-
ObjectInput in = CodecSupport.deserialize(channel.getUrl(), is, proto);
7776
if (status == Response.OK) {
7877
Object data;
7978
if (res.isHeartbeat()) {
79+
ObjectInput in = CodecSupport.deserialize(channel.getUrl(), is, proto);
8080
data = decodeHeartbeatData(channel, in);
8181
} else if (res.isEvent()) {
82+
ObjectInput in = CodecSupport.deserialize(channel.getUrl(), is, proto);
8283
data = decodeEventData(channel, in);
8384
} else {
8485
DecodeableRpcResult result;
@@ -97,6 +98,7 @@ protected Object decodeBody(Channel channel, InputStream is, byte[] header) thro
9798
}
9899
res.setResult(data);
99100
} else {
101+
ObjectInput in = CodecSupport.deserialize(channel.getUrl(), is, proto);
100102
res.setErrorMessage(in.readUTF());
101103
}
102104
} catch (Throwable t) {

0 commit comments

Comments
 (0)