Skip to content

Commit

Permalink
fix(sync): remove illegal sync-state
Browse files Browse the repository at this point in the history
  • Loading branch information
RCmerci committed Apr 4, 2022
1 parent 0cdcdce commit 691f256
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/frontend/fs/sync.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
(defn- ws-listen!*
[graph-uuid *ws remote-changes-chan]
(reset! *ws {:ws (js/WebSocket. (util/format ws-addr graph-uuid)) :stop false})
(set! (.-onopen (:ws @*ws)) #(println (util/format "ws opened: graph '%s'" graph-uuid %)))
;; (set! (.-onopen (:ws @*ws)) #(println (util/format "ws opened: graph '%s'" graph-uuid %)))
(set! (.-onclose (:ws @*ws)) (fn [_e]
(when-not (true? (:stop @*ws))
(go
Expand Down Expand Up @@ -1095,9 +1095,7 @@
(<! (sync-remote->local! remote->local-syncer))]
(cond
need-remote->local-full-sync
(if (= next-state ::local->remote-full-sync)
(.schedule this ::remote->local-full-sync=>local->remote-full-sync)
(.schedule this ::remote->local-full-sync))
(.schedule this ::remote->local-full-sync=>local->remote-full-sync)
succ
(.schedule this (or next-state ::idle))
stop
Expand Down

0 comments on commit 691f256

Please sign in to comment.