Skip to content

Commit 53ae283

Browse files
committed
fix: rtc doesn't auto-restart when websocket timeouts
1 parent 7d30f99 commit 53ae283

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/frontend/worker/rtc/core.cljs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,8 @@
523523
(m/?<
524524
(m/latest
525525
(fn [rtc-state rtc-auto-push? rtc-remote-profile?
526-
rtc-lock online-users pending-local-ops-count pending-asset-ops-count [local-tx remote-tx]]
526+
rtc-lock online-users pending-local-ops-count pending-asset-ops-count
527+
[local-tx remote-tx] last-stop-ex]
527528
{:graph-uuid graph-uuid
528529
:local-graph-schema-version (db-schema/schema-version->string local-graph-schema-version)
529530
:remote-graph-schema-version (db-schema/schema-version->string remote-graph-schema-version)
@@ -537,13 +538,14 @@
537538
:auto-push? rtc-auto-push?
538539
:remote-profile? rtc-remote-profile?
539540
:online-users online-users
540-
:last-stop-exception-ex-data (some-> *last-stop-exception deref ex-data)})
541+
:last-stop-exception-ex-data (some-> last-stop-ex ex-data)})
541542
rtc-state-flow
542543
(m/watch *rtc-auto-push?) (m/watch *rtc-remote-profile?)
543544
(m/watch *rtc-lock') (m/watch *online-users)
544545
(client-op/create-pending-block-ops-count-flow repo)
545546
(client-op/create-pending-asset-ops-count-flow repo)
546-
(rtc-log-and-state/create-local&remote-t-flow graph-uuid))))
547+
(rtc-log-and-state/create-local&remote-t-flow graph-uuid)
548+
(m/watch *last-stop-exception))))
547549
(catch Cancelled _))))))
548550

549551
(def ^:private create-get-state-flow (c.m/throttle 300 create-get-state-flow*))

0 commit comments

Comments
 (0)