             (when-not @winner
               (recur)))))
       ;; Cleanup
-      (doseq [{:keys [latch ch-out]} players]
+      (doseq [{:keys [latch] [_ ch-out] :chs} players]
         (<! (notify ch-out))
         (>! ch-out {:type (if @winner "end" "disconnected")})
         (async/close! latch)))))

        dirs [1 nrows (inc nrows)]]
    (when (first
           (for [dir dirs]
             (<= (inc n-to-win)
                 (+
                  (count
                   (for [j (reductions + (repeat (- dir)))
                         :while (= cand (state-val j))]
                     true))
                  (count
                   (for [j (reductions + (repeat (+ dir)))
                         :while (= cand (state-val j))]
                     true))))))
      cand)))


   [taoensso.timbre :as tb]
   [manifold
    [stream :as st]
    [deferred :as df]]
   [aleph
    [http :as http]]
   [compojure.core
