Skip to content

Commit 8a2724f

Browse files
authored
perf: lessen wasting time for pubsub (#229)
1 parent 1e9de53 commit 8a2724f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/redis_client/cluster/pub_sub.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def close
2222

2323
def take_message(timeout)
2424
@worker = subscribe(@client, timeout) if @worker.nil?
25-
return if @worker.join(0.01).nil?
25+
return if @worker.alive?
2626

2727
message = @worker[:reply]
2828
@worker = nil

0 commit comments

Comments
 (0)