Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

Commit 9aecd37

Browse files
committed
all servers: remove idle timeout fixes jooby-project#209
1 parent f637265 commit 9aecd37

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

jooby-netty/src/main/java/org/jooby/internal/netty/NettyInitializer.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,13 @@ protected void initChannel(final SocketChannel ch) throws Exception {
7979
pipeline
8080
.addLast("decoder",
8181
new HttpRequestDecoder(maxInitialLineLength, maxHeaderSize, maxChunkSize, false))
82-
.addLast("encoder", new HttpResponseEncoder())
83-
.addLast("timeout", new IdleStateHandler(0, 0, idleTimeOut, TimeUnit.MILLISECONDS))
82+
.addLast("encoder", new HttpResponseEncoder());
83+
84+
if (idleTimeOut > 0) {
85+
pipeline.addLast("timeout", new IdleStateHandler(0, 0, idleTimeOut, TimeUnit.MILLISECONDS));
86+
}
87+
88+
pipeline
8489
.addLast("aggregator", new HttpObjectAggregator(maxContentLength))
8590
.addLast(executor, "handler", new NettyHandler(handler, config));
8691
}

jooby/src/main/resources/org/jooby/jooby.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ server {
109109

110110
MaxRequestSize = 200k
111111

112-
IdleTimeout = 30s
112+
IdleTimeout = 0
113113

114114
Method = _method
115115
}

0 commit comments

Comments
 (0)