mirror of https://github.com/logseq/logseq
fix: start rtc if ws state is :closing
parent
f6513e0169
commit
e523407738
|
@ -340,7 +340,9 @@
|
|||
(state/set-state! :rtc/uploading? false)
|
||||
;; No need to wait for rtc-start since it's a go loop that'll
|
||||
;; return a value once it's stopped
|
||||
(and (rtc-handler/<rtc-start! repo) false))
|
||||
(and (p/do!
|
||||
(rtc-handler/<rtc-stop!)
|
||||
(rtc-handler/<rtc-start! repo)) false))
|
||||
(p/catch (fn [error]
|
||||
(reset! *creating-db? false)
|
||||
(state/set-state! :rtc/uploading? false)
|
||||
|
|
|
@ -1129,7 +1129,7 @@
|
|||
[repo conn token dev-mode?]
|
||||
(go
|
||||
(if-let [graph-uuid (ldb/get-graph-rtc-uuid @conn)]
|
||||
(do (assert (and (contains? #{:closed nil} (some-> @*state :*ws deref ws/get-state))
|
||||
(do (assert (and (contains? #{:closed :closing nil} (some-> @*state :*ws deref ws/get-state))
|
||||
(contains? #{:closed nil} (some-> @*state :*rtc-state deref)))
|
||||
(str
|
||||
"*state should be :closed"
|
||||
|
|
Loading…
Reference in New Issue