Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
b062edf3
Commit
b062edf3
authored
May 11, 2009
by
Ludovico Magnocavallo
Browse files
disconnect when we cannot read from the socket
parent
ecfaf6da
Changes
1
Hide whitespace changes
Inline
Side-by-side
client-libraries/python/redis.py
View file @
b062edf3
...
...
@@ -880,6 +880,9 @@ class Redis(object):
def
get_response
(
self
):
data
=
self
.
_read
().
strip
()
if
not
data
:
self
.
disconnect
()
raise
ConnectionError
(
"Socket closed on remote end"
)
c
=
data
[
0
]
if
c
==
'-'
:
raise
ResponseError
(
data
[
5
:]
if
data
[:
5
]
==
'-ERR '
else
data
[
1
:])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment