action-cable-redis-backport 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/action-cable-redis-backport.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21ba9cf50ede2f8bdac15cc9771ab72c6b0af7507103dd28b7569cf08c438a88
|
4
|
+
data.tar.gz: ca4428362708d50d2b53bcdb5d8939ed5e64b40b45f26409c7d8a388420435aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0176a2c994aed186fed59e2d59f42c6b0e859171a43fc13d98e3e5048c979e172686ad2c7ca5f66b5282c687a0998821fe0ab075c212651e9b79ece0999a9cea
|
7
|
+
data.tar.gz: 296efcd551ba89621e4bcb010ab5db084cd28f5d0f745caf215b4d18703c4a176e26972355794326576714b8c3d58033eb74d75f635b3850d717dc317c5ae239
|
@@ -17,7 +17,11 @@ module ActionCableRedisBackport
|
|
17
17
|
|
18
18
|
@reconnect_attempt = 0
|
19
19
|
@reconnect_attempts = ::ActionCable.server.config.cable&.fetch("reconnect_attempts", 1)
|
20
|
-
@reconnect_attempts =
|
20
|
+
@reconnect_attempts = if @reconnect_attempts.is_a?(Integer)
|
21
|
+
reconnect_delay = ::ActionCable.server.config.cable["reconnect_delay"] || 0
|
22
|
+
reconnect_delay_max = ::ActionCable.server.config.cable["reconnect_delay_max"] || 0.5
|
23
|
+
@reconnect_attempts.times.map { |i| [(reconnect_delay * 2**i), reconnect_delay_max].min }
|
24
|
+
end
|
21
25
|
end
|
22
26
|
|
23
27
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action-cable-redis-backport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir Dementyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actioncable
|