Skip to content

Commit

Permalink
Fix incorrect attribute reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
zhousheng06 committed Dec 12, 2024
1 parent 9d5751d commit 1423037
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion redis/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,9 +870,11 @@ def read_response(
and self._cache.get(self._current_command_cache_key).status
!= CacheEntryStatus.IN_PROGRESS
):
return copy.deepcopy(
res = copy.deepcopy(
self._cache.get(self._current_command_cache_key).cache_value
)
self._current_command_cache_key = None
return res

response = self._conn.read_response(
disable_decoding=disable_decoding,
Expand All @@ -898,6 +900,8 @@ def read_response(
cache_entry.cache_value = response
self._cache.set(cache_entry)

self._current_command_cache_key = None

return response

def pack_command(self, *args):
Expand Down

0 comments on commit 1423037

Please sign in to comment.