Permalink
Browse files

get rid of spurious write error logging

  • Loading branch information...
1 parent bb0657f commit 6e758cb00a3d450734571dabf569777b3d82b108 @ztellman committed Mar 21, 2012
Showing with 10 additions and 6 deletions.
  1. +3 −1 src/aleph/http/server.clj
  2. +1 −0 src/aleph/http/server/responses.clj
  3. +6 −5 src/aleph/netty.clj
View
4 src/aleph/http/server.clj
@@ -99,7 +99,9 @@
(timeout-response)
(error-response))]
(write-to-channel netty-channel response (not (:keep-alive? request))))
- (respond netty-channel options (first response) (second response))))))
+ (do
+ (respond netty-channel options (first response) (second response))
+ nil)))))
(fn [_] (.close netty-channel))))
(enqueue ch request)))
View
1 src/aleph/http/server/responses.clj
@@ -117,6 +117,7 @@
(run-pipeline (let [result (write-to-channel netty-channel initial-response false)]
(enqueue returned-result result)
result)
+ :error-handler (fn [_])
(fn [_]
(receive-in-order
(map*
View
11 src/aleph/netty.clj
@@ -263,12 +263,13 @@
[^Channel netty-channel msg close?
& {close-callback :on-close write-callback :on-write host :host port :port}]
(if msg
- (run-pipeline
- (io!
- (if (and host port)
- (.write netty-channel msg (InetSocketAddress. ^String host (int port)))
- (.write netty-channel msg)))
+ (run-pipeline nil
:error-handler (fn [_])
+ (fn [_]
+ (io!
+ (if (and host port)
+ (.write netty-channel msg (InetSocketAddress. ^String host (int port)))
+ (.write netty-channel msg))))
wrap-netty-channel-future
(fn [_]
(when write-callback

0 comments on commit 6e758cb

Please sign in to comment.