Skip to content

Commit e7ef54a

Browse files
dvora-hchayim
authored andcommitted
Fix bug: client side caching causes unexpected disconnections (async version) (#3165)
* fix disconnects * skip test in cluster * add test * save return value from handle_push_response (without it 'read_response' return the push message) * insert return response from cache to the try block to prevent connection leak * enable to get connection with data avaliable to read in csc mode and change can_read_destructive to not read data * fix check if socket is empty (at_eof() can return False but this doesn't mean there's definitely more data to read) --------- Co-authored-by: Chayim <[email protected]>
1 parent 0cd0c5d commit e7ef54a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

redis/_parsers/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ async def can_read_destructive(self) -> bool:
182182
return True
183183
try:
184184
async with async_timeout(0):
185-
return await self._stream.read(1)
185+
return self._stream.at_eof()
186186
except TimeoutError:
187187
return False
188188

0 commit comments

Comments
 (0)