           (instance? MessageEvent evt)
           (let [msg (.getMessage ^MessageEvent evt)
                 [next-fn args] @state]
-            (swap! state (next-fn args state ch msg)))
+            (next-fn state ch msg args))
 
           (and (instance? ChannelStateEvent evt)
                (= ChannelState/INTEREST_OPS

(defn- downstream-fn
  [state channel keepalive?]
  ;; The state of the response needs to be tracked
  (let [next-fn (atom #(initialize-resp %1 %2
                                        state channel
                                        keepalive? false nil))]

    ;; The upstream application will call this function to
    ;; send the response back to the client

                     (.getContent msg)
                     nil)])
        (upstream :done nil)
        (transition-from-req-done state)))))

(defn- netty-bridge
  [app opts]
