Skip to content
Browse files

Merge pull request #66 from getaroom/master

Fix hung passenger processes
  • Loading branch information...
2 parents 8ac8455 + 2c040a9 commit 95ac697668f7382ffad1bfec45c2a8df407a81b9 @assaf assaf committed Aug 24, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/vanity/adapters/redis_adapter.rb
  2. +1 −1 test/adapters/redis_adapter_test.rb
View
2 lib/vanity/adapters/redis_adapter.rb
@@ -28,7 +28,7 @@ def active?
def disconnect!
if redis
begin
- redis.quit
+ redis.client.disconnect
rescue Exception => e
warn("Error while disconnecting from redis: #{e.message}")
end
View
2 test/adapters/redis_adapter_test.rb
@@ -6,7 +6,7 @@ def test_warn_on_disconnect_error
assert_nothing_raised do
Redis.any_instance.stubs(:connect!)
mocked_redis = stub("Redis")
- mocked_redis.expects(:quit).raises(RuntimeError)
+ mocked_redis.expects(:client).raises(RuntimeError)
redis_adapter = Vanity::Adapters::RedisAdapter.new({})
redis_adapter.expects(:warn).with("Error while disconnecting from redis: RuntimeError")
redis_adapter.stubs(:redis).returns(mocked_redis)

0 comments on commit 95ac697

Please sign in to comment.
Something went wrong with that request. Please try again.