oxsean commented on code in PR #14127:
URL: https://github.com/apache/dubbo/pull/14127#discussion_r1577996697
##########
dubbo-remoting/dubbo-remoting-http12/src/main/java/org/apache/dubbo/remoting/http12/HttpOutputMessage.java:
##########
@@ -29,6 +29,11 @@ public interface HttpOutputMessage {
public OutputStream getBody() {
return INPUT_STREAM;
}
+
+ @Override
+ public void close() throws Exception {
+ INPUT_STREAM.close();
Review Comment:
Unnecessary
##########
dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/h12/http1/DefaultHttp11ServerTransportListener.java:
##########
@@ -82,6 +83,15 @@ protected HttpMessageListener buildHttpMessageListener() {
return new DefaultHttpMessageListener(listeningDecoder);
}
+ @Override
+ protected void doOnData(HttpInputMessage message) {
Review Comment:
Is http2 also need it? so I think add it into Ondata is more reasonable:
```Java
public void onData(MESSAGE message) {
executor.execute(() -> {
try {
doOnData(message);
} catch (Throwable t) {
logError(t);
onError(t);
} finally {
try {
message.close();
} catch (Exception e) {
onError(e);
}
}
});
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]