You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was browsing the driver source in the course of reviewing Redis for work and found a few potential bugs in the socket code.
The _read() method is calling "return self._fp.readline()", but this is bypassing the code at the end of the method which should be checking to see if self._sock.recv()=='', so a disconnect will likely not be handled correctly. It seems that _get_response() might handle this correctly, but _get_value() will raise a ValueError instead of a ConnectionError.
In the _send_command() method, if an EPIPE is raised, it won't work across platforms because it's checking if the value is 32, and not errno.EPIPE. I've had trouble with this in the past, as Linux and OSX use different enumerations.
The text was updated successfully, but these errors were encountered:
Thanks for finding this issue. It has been resolved in the "newapi" branch of redis-py. I plan on merging it into master in the next day or two, and then making an official release.
Glad I could help. I was going to patch it in a branch but ran out of time. We're very interested in redis and will be using this driver when we get around to experimenting with it.
I was browsing the driver source in the course of reviewing Redis for work and found a few potential bugs in the socket code.
The _read() method is calling "return self._fp.readline()", but this is bypassing the code at the end of the method which should be checking to see if self._sock.recv()=='', so a disconnect will likely not be handled correctly. It seems that _get_response() might handle this correctly, but _get_value() will raise a ValueError instead of a ConnectionError.
In the _send_command() method, if an EPIPE is raised, it won't work across platforms because it's checking if the value is 32, and not errno.EPIPE. I've had trouble with this in the past, as Linux and OSX use different enumerations.
The text was updated successfully, but these errors were encountered: