summaryrefslogtreecommitdiff
path: root/redis/connection.py
diff options
context:
space:
mode:
Diffstat (limited to 'redis/connection.py')
-rw-r--r--redis/connection.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/redis/connection.py b/redis/connection.py
index ff7f277..a85129b 100644
--- a/redis/connection.py
+++ b/redis/connection.py
@@ -174,8 +174,8 @@ class Connection(object):
pass
self._sock = None
- def _send(self, command):
- "Send the command to the socket"
+ def send_packed_command(self, command):
+ "Send an already packed command to the Redis server"
if not self._sock:
self.connect()
try:
@@ -190,17 +190,6 @@ class Connection(object):
raise ConnectionError("Error %s while writing to socket. %s." % \
(_errno, errmsg))
- def send_packed_command(self, command):
- "Send an already packed command to the Redis server"
- try:
- self._send(command)
- except ConnectionError:
- # retry the command once in case the socket connection simply
- # timed out
- self.disconnect()
- # if this _send() call fails, then the error will be raised
- self._send(command)
-
def send_command(self, *args):
"Pack and send a command to the Redis server"
self.send_packed_command(self.pack_command(*args))