Skip to content

Commit fcc402d

Browse files
committed
Move attach-idle-handlers
1 parent 3b8539d commit fcc402d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/aleph/http/core.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@
633633
(defn attach-idle-handlers [^ChannelPipeline pipeline idle-timeout]
634634
(if (pos? idle-timeout)
635635
(doto pipeline
636-
(.addFirst "idle" ^ChannelHandler (IdleStateHandler. 0 0 idle-timeout TimeUnit/MILLISECONDS))
636+
(.addLast "idle" ^ChannelHandler (IdleStateHandler. 0 0 idle-timeout TimeUnit/MILLISECONDS))
637637
(.addLast "idle-close" ^ChannelHandler (close-on-idle-handler)))
638638
pipeline))
639639

src/aleph/http/server.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,7 @@
505505
ssl?))]
506506

507507
(doto pipeline
508+
(http/attach-idle-handlers idle-timeout)
508509
(.addLast "http-server"
509510
(HttpServerCodec.
510511
max-initial-line-length
@@ -517,7 +518,6 @@
517518
(let [compressor (HttpContentCompressor. (or compression-level 6))]
518519
(.addAfter ^ChannelPipeline %1 "http-server" "deflater" compressor))
519520
(.addAfter ^ChannelPipeline %1 "deflater" "streamer" (ChunkedWriteHandler.))))
520-
(http/attach-idle-handlers idle-timeout)
521521
pipeline-transform))))
522522

523523
;;;

0 commit comments

Comments
 (0)