Skip to content

Commit

Permalink
Eagerly close subscribed connection
Browse files Browse the repository at this point in the history
Fix: #1259

Otherwise we need to wait for GC to close it.
  • Loading branch information
byroot committed Apr 2, 2024
1 parent 7cc45e5 commit bbace4d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/redis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ def _subscription(method, timeout, channels, block)
@subscription_client.send(method, *channels, &block)
end
ensure
@subscription_client&.close
@subscription_client = nil
end
else
Expand Down

0 comments on commit bbace4d

Please sign in to comment.