         (let [req (async/<! req-chan)
               resp-chan (async/chan)
               error-chan (async/chan)]
-          (swap! outstanding inc)
-          (when (< @outstanding threshold-concurrency)
-            (async/go (async/alt!
-                        resp-chan ([resp] (swap! outstanding dec) (async/>! (:async-response req) resp))
-                        error-chan ([e] (swap! outstanding dec) (async/>! (:async-error req) e))))
-            (async/>! async-middleware
-                      (assoc req
-                             :async-response resp-chan
-                             :async-error error-chan))))))
+          (if (< @outstanding threshold-concurrency)
+            (do (swap! outstanding inc)
+                (async/go (async/alt!
+                            resp-chan ([resp] (swap! outstanding dec) (async/>! (:async-response req) resp))
+                            error-chan ([e] (swap! outstanding dec) (async/>! (:async-error req) e))))
+                (async/>! async-middleware
+                          (assoc req
+                                 :async-response resp-chan
+                                 :async-error error-chan)))
+            (async/>! (:async-response req) shed-response)))))
     req-chan))
 
 #_(defn work-shed

        (while true
          (let [req (async/<! req-chan)]
            (try
                (print (str "Making an attempt!"))
                (flush)
              (let [resp (handler req)]
                (print (str "Handler returned " resp))
                (flush)
                (if resp
                  (async/>! (:async-response req) resp)
                  (async/>! (:async-error req)

  (-> ;(constant-response {:status 404 :body "nononon!"})
      (sync->async-adapter #'ring-app)
      (sync->async-middleware wrap-params)
      (work-shed 3 {:status 503 :body "work shedding"})
      (to-httpkit)))

(comment
