       (.options current-state)))
   ([keepalive-timeout-atom ch options]
      (clear-keepalive-timeout keepalive-timeout-atom)
-     (reset! keepalive-timeout-atom
-             (netty/on-timeout
-              global-timer (* (:keepalive options) 1000)
-              (fn []
-                (debug {:msg "Connection reached max keepalive time."
-                        :event ch})
-                (.close ch))))))
+     (reset!
+      keepalive-timeout-atom
+      (netty/on-timeout
+       global-timer (* (:keepalive options) 1000)
+       (fn []
+         (debug {:msg "Connection reached max keepalive time." :event ch})
+         (.close ch))))))
 
 (defn- write-msg
   [state current-state msg]


(defn- write-last-msg
  [state current-state msg close-channel?]
  (let [last-write (if msg
                     (write-msg state current-state msg)
                     (.last-write current-state))]
    (when close-channel?
      (.addListener last-write netty/close-channel-future-listener))))


            (debug {:msg "Killing connection" :state current-state})
            (write-last-msg state current-state last-msg true))))
      (write-last-msg state current-state last-msg false))))

(defn- stream-or-finalize-response
  [state evt chunk current-state]
