summaryrefslogtreecommitdiff
path: root/redis/connection.py
diff options
context:
space:
mode:
authorAndy McCurdy <andy@andymccurdy.com>2015-09-28 15:34:29 -0700
committerAndy McCurdy <andy@andymccurdy.com>2015-09-28 15:34:29 -0700
commited2a079cc3ff7db82e197307d388ca9c96cb092e (patch)
tree2fec24357bdcf1558feb0fcfd0a0beded958d6a3 /redis/connection.py
parentf6338499b2d390dcb25c8835f9418f63794be2a5 (diff)
downloadredis-py-ed2a079cc3ff7db82e197307d388ca9c96cb092e.tar.gz
removed the proactive check in HiredisParser for a line ending
it turns out just calling into hiredis to test this is faster than doing string compare in Python. fixes #615 and #650.
Diffstat (limited to 'redis/connection.py')
-rwxr-xr-xredis/connection.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/redis/connection.py b/redis/connection.py
index 0229d28..19d6925 100755
--- a/redis/connection.py
+++ b/redis/connection.py
@@ -346,15 +346,6 @@ class HiredisParser(BaseParser):
self._reader.feed(self._buffer, 0, bufflen)
else:
self._reader.feed(buffer)
- # proactively, but not conclusively, check if more data is in the
- # buffer. if the data received doesn't end with \r\n, there's more.
- if HIREDIS_USE_BYTE_BUFFER:
- if bufflen > 2 and \
- self._buffer[bufflen - 2:bufflen] != SYM_CRLF:
- continue
- else:
- if not buffer.endswith(SYM_CRLF):
- continue
response = self._reader.gets()
# if an older version of hiredis is installed, we need to attempt
# to convert ResponseErrors to their appropriate types.