Skip to content

Commit cbf965d

Browse files
committed
Eagerly close subscribed connection
Fix: #1259 Otherwise we need to wait for GC to close it.
1 parent 35a7e82 commit cbf965d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/redis.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ def _subscription(method, timeout, channels, block)
175175
@subscription_client.send(method, *channels, &block)
176176
end
177177
ensure
178+
@subscription_client&.close
178179
@subscription_client = nil
179180
end
180181
else

0 commit comments

Comments
 (0)