File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
actioncable/lib/action_cable/subscription_adapter Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 473
473
rdoc (6.9.1 )
474
474
psych (>= 4.0.0 )
475
475
redcarpet (3.6.1 )
476
- redis (5.3.0 )
476
+ redis (5.4.1 )
477
477
redis-client (>= 0.22.0 )
478
- redis-client (0.24.0 )
478
+ redis-client (0.25.1 )
479
479
connection_pool
480
480
redis-namespace (1.11.0 )
481
481
redis (>= 4 )
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ def ensure_listener_running
164
164
begin
165
165
conn = @adapter . redis_connection_for_subscriptions
166
166
listen conn
167
- rescue ConnectionError
167
+ rescue * CONNECTION_ERRORS
168
168
reset
169
169
if retry_connecting?
170
170
when_connected { resubscribe }
@@ -210,7 +210,7 @@ def reset
210
210
end
211
211
212
212
if ::Redis ::VERSION < "5"
213
- ConnectionError = ::Redis ::BaseConnectionError
213
+ CONNECTION_ERRORS = [ ::Redis ::BaseConnectionError ] . freeze
214
214
215
215
class SubscribedClient
216
216
def initialize ( raw_client )
@@ -244,7 +244,12 @@ def extract_subscribed_client(conn)
244
244
SubscribedClient . new ( conn . _client )
245
245
end
246
246
else
247
- ConnectionError = RedisClient ::ConnectionError
247
+ CONNECTION_ERRORS = [
248
+ ::Redis ::BaseConnectionError ,
249
+
250
+ # Some older versions of redis-rb sometime leak underlying exceptions
251
+ RedisClient ::ConnectionError ,
252
+ ] . freeze
248
253
249
254
def extract_subscribed_client ( conn )
250
255
conn
You can’t perform that action at this time.
0 commit comments