Skip to content

Commit fb7e374

Browse files
committed
Change redis.client usage to redis._client .
redis.client calls the 'CLIENT' command with no arguments, which is rejected by Redis. What we *actually* want is to access the client instance.
1 parent d8d3233 commit fb7e374

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/logstash/inputs/redis.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def connect
157157

158158
# register any renamed Redis commands
159159
if @command_map.any?
160-
client_command_map = redis.client.command_map
160+
client_command_map = redis._client.command_map
161161
@command_map.each do |name, renamed|
162162
client_command_map[name.to_sym] = renamed.to_sym
163163
end
@@ -269,14 +269,14 @@ def subscribe_stop
269269
return if @redis.nil? || !@redis.connected?
270270
# if its a SubscribedClient then:
271271
# it does not have a disconnect method (yet)
272-
if @redis.client.is_a?(::Redis::SubscribedClient)
272+
if @redis._client.is_a?(::Redis::SubscribedClient)
273273
if @data_type == 'pattern_channel'
274-
@redis.client.punsubscribe
274+
@redis._client.punsubscribe
275275
else
276-
@redis.client.unsubscribe
276+
@redis._client.unsubscribe
277277
end
278278
else
279-
@redis.client.disconnect
279+
@redis._client.disconnect
280280
end
281281
@redis = nil
282282
end

0 commit comments

Comments
 (0)