Skip to content

Commit 0c6129a

Browse files
committed
[test] 增加 NettyHttpServerRequest 的日志来寻找 action 中异常关闭的原因
1 parent 6a09ad3 commit 0c6129a

File tree

1 file changed

+4
-0
lines changed
  • framework/fit/java/fit-builtin/plugins/fit-http-server-netty/src/main/java/modelengine/fit/http/server/netty

1 file changed

+4
-0
lines changed

framework/fit/java/fit-builtin/plugins/fit-http-server-netty/src/main/java/modelengine/fit/http/server/netty/NettyHttpServerRequest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import modelengine.fit.http.protocol.RequestLine;
2424
import modelengine.fit.http.protocol.ServerRequest;
2525
import modelengine.fit.http.protocol.util.HeaderUtils;
26+
import modelengine.fitframework.log.Logger;
2627
import modelengine.fitframework.util.ObjectUtils;
2728

2829
import java.io.IOException;
@@ -39,6 +40,8 @@
3940
* @since 2022-07-08
4041
*/
4142
public class NettyHttpServerRequest implements ServerRequest, OnHttpContentReceived {
43+
private static final Logger log = Logger.get(NettyHttpServerRequest.class);
44+
4245
private static final char QUERY_SEPARATOR = '?';
4346

4447
private final HttpRequest request;
@@ -155,6 +158,7 @@ private void checkIfClosed() throws IOException {
155158

156159
@Override
157160
public void close() throws IOException {
161+
log.info("Netty http request closed. [id={}]", this.ctx.name());
158162
this.isClosed = true;
159163
this.body.close();
160164
}

0 commit comments

Comments
 (0)