Skip to content

Commit

Permalink
Merge pull request #1260 from casperisfine/eagerly-close-subscription
Browse files Browse the repository at this point in the history
Eagerly close subscribed connection
  • Loading branch information
byroot authored Apr 2, 2024
2 parents 905aae9 + cbf965d commit 8ab2753
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 8ab2753

Please sign in to comment.