Skip to content

Commit

Permalink
Revalidate connection in RedisClient#connected?
Browse files Browse the repository at this point in the history
Otherwise if it has pending reads it will be closed when
used anyway.
  • Loading branch information
byroot committed Dec 7, 2023
1 parent 8a3dafd commit 98b161e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased

- Revalidate connection in `RedisClient#connected?`
- Eagerly fail if `db:` isn't an Integer. #151.

# 0.18.0
Expand Down
2 changes: 1 addition & 1 deletion lib/redis_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def zscan(key, *args, **kwargs, &block)
end

def connected?
@raw_connection&.connected?
@raw_connection&.revalidate
end

def close
Expand Down

0 comments on commit 98b161e

Please sign in to comment.