               ;; Let loop die if ws-channel dies
               (go-loop
                 []
-                (when-let [message (<! write-channel)]
+                (when-let [message (<! read-from-client)]
                   (when (not (h/has-type message (:type h/socket-closed-message)))
                     (do
                       (>! formated-channel message)

  The second is a meta channel that receives a messages each
  time the channel is either disconnected or connected."
  []
  (let [read-channel  (chan)
        write-channel (chan)
        meta-channel  (chan (sliding-buffer 1))]
    (go 
      (>! meta-channel (h/attempting-connect-message address))

              (loop []
                (when-let [message (<! formated-channel)]
                  (do 
                    (>! write-to-client message)
                    (recur))))

              ;; Send termination message to write loop and notify on meta channel
              (>! read-from-client h/socket-closed-message)
              (>! meta-channel  (h/attempting-connect-message address)))))
        (recur)))
    [(h/combine-channels write-to-client read-from-client)
     meta-channel]))
