Skip to content

Commit

Permalink
electric3 client: slow down reconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
dustingetz committed Sep 29, 2024
1 parent 6d1e34d commit aedd825
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hyperfiddle/electric_client3.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@

(comment (take 5 fib2) := [1 1 2 3 5])

(def retry-delays (map (partial * 100) (next fib)))
(def retry-delays (map (partial * 1000) (next fib)))
;; Browsers throttle websocket connects after too many attempts in a short time.
;; To prevent using browsers as port scanners.
;; Symptom: WS takes a long time to establish a connection for no apparent reason.
Expand Down

1 comment on commit aedd825

@den1k
Copy link
Collaborator

@den1k den1k commented on aedd825 Oct 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't this mean that if a user is offline for a little over 2 minutes (1+1+2+3+5+8+13+21+34+55=143s) electric will wait 89s to reconnect?

Please sign in to comment.