Permalink
Browse files

point to latest lamina, and take a stab at getting rid of spurious wr…

…ite error logging
  • Loading branch information...
ztellman committed Mar 7, 2012
1 parent 175a8f1 commit eade2103a3ee2662007a7b3d5018db3cfff629a3
Showing with 19 additions and 15 deletions.
  1. +4 −4 project.clj
  2. +15 −11 src/aleph/http/server.clj
View
@@ -11,18 +11,18 @@
[org.clojure.contrib/prxml "1.3.0-alpha4"]
[io.netty/netty "3.3.1.Final"]
[clj-http "0.1.3"]
[lamina "0.4.1-alpha1"]
[lamina "0.4.1-alpha2-SNAPSHOT"]
[gloss "0.2.1-alpha2-SNAPSHOT"]
[user-agent-utils "1.2.3"]
[potemkin "0.1.1"]]
[potemkin "0.1.2-SNAPSHOT"]]
:multi-deps {:all [[org.clojure/tools.logging "0.2.3"]
[org.clojure/data.json "0.1.1"]
[org.clojure.contrib/prxml "1.3.0-alpha4"]
[io.netty/netty "3.3.1.Final"]
[clj-http "0.1.3"]
[lamina "0.4.1-alpha1"]
[lamina "0.4.1-alpha2-SNAPSHOT"]
[gloss "0.2.1-alpha2-SNAPSHOT"]
[user-agent-utils "1.2.3"]
[potemkin "0.1.1"]]
[potemkin "0.1.2-SNAPSHOT"]]
"1.2" [[org.clojure/clojure "1.2.1"]]}
:jvm-opts ["-server" "-XX:+UseConcMarkSweepGC"])
View
@@ -85,17 +85,21 @@
wrap-netty-channel-future
(fn [_] (close ch)))
(run-pipeline
(receive-in-order (consume-request-stream netty-channel ch server-generator options)
(fn [{:keys [request response]}]
(if (instance? Exception response)
(let [response (if (or
(instance? InterruptedException response)
(instance? TimeoutException response))
(timeout-response)
(error-response))]
(write-to-channel netty-channel response (not (:keep-alive? request))))
(respond netty-channel options (first response) (second response)))))
(run-pipeline nil
:error-handler (fn [_]
(.close netty-channel)
(complete nil))
(fn [_]
(receive-in-order (consume-request-stream netty-channel ch server-generator options)
(fn [{:keys [request response]}]
(if (instance? Exception response)
(let [response (if (or
(instance? InterruptedException response)
(instance? TimeoutException response))
(timeout-response)
(error-response))]
(write-to-channel netty-channel response (not (:keep-alive? request))))
(respond netty-channel options (first response) (second response))))))
(fn [_] (.close netty-channel))))
(enqueue ch request)))

0 comments on commit eade210

Please sign in to comment.