diff --git a/lib/redis_client/cluster/pub_sub.rb b/lib/redis_client/cluster/pub_sub.rb index de1811dc..02893943 100644 --- a/lib/redis_client/cluster/pub_sub.rb +++ b/lib/redis_client/cluster/pub_sub.rb @@ -22,7 +22,7 @@ def close def take_message(timeout) @worker = subscribe(@client, timeout) if @worker.nil? - return if @worker.join(0.01).nil? + return if @worker.alive? message = @worker[:reply] @worker = nil