From e5234077389110a792f4d446fd10a4c7a67f0c1f Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Tue, 19 Mar 2024 14:54:36 +0800 Subject: [PATCH] fix: start rtc if ws state is :closing --- src/main/frontend/components/repo.cljs | 4 +++- src/main/frontend/worker/rtc/core.cljs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/frontend/components/repo.cljs b/src/main/frontend/components/repo.cljs index 7e5f9d6d3..4d6c15930 100644 --- a/src/main/frontend/components/repo.cljs +++ b/src/main/frontend/components/repo.cljs @@ -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/ @*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"