From 01e2836071492db464ebd6f33ce6d499057ec8f5 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Fri, 27 Aug 2021 18:55:54 +0100 Subject: [PATCH] FIX: Allow PresenceChannel to work on Redis 6.0 (#14178) The `ZRANGE ... BYSCORE` syntax was only added in 6.2. We can use the older `ZRANGEBYSCORE` instead --- lib/presence_channel.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/presence_channel.rb b/lib/presence_channel.rb index 14bd4417f01..210b0f2c6bf 100644 --- a/lib/presence_channel.rb +++ b/lib/presence_channel.rb @@ -584,7 +584,7 @@ class PresenceChannel local time = ARGV[2] local mutex_value = ARGV[3] - local expire = redis.call('ZRANGE', zlist_key, '-inf', time, 'BYSCORE') + local expire = redis.call('ZRANGEBYSCORE', zlist_key, '-inf', time) local has_mutex = false