summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjunnplus <junnplus@gmail.com>2019-01-31 14:25:48 +0800
committerjunnplus <junnplus@gmail.com>2019-01-31 14:25:48 +0800
commitd2503b44f3a30161d0fb2b37016e8331adc84c01 (patch)
tree120b801a07f513e1cca7c6e99f12cdb0b9adf0ce
parent2f3afb0a2b6adaa7287173f07ea5b7fee8551083 (diff)
downloadredis-py-d2503b44f3a30161d0fb2b37016e8331adc84c01.tar.gz
use IPPROTO_TCP constant instead of SOL_TCP constant
-rwxr-xr-xredis/connection.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/redis/connection.py b/redis/connection.py
index 0d1c394..73b48e0 100755
--- a/redis/connection.py
+++ b/redis/connection.py
@@ -529,7 +529,7 @@ class Connection(object):
if self.socket_keepalive:
sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
for k, v in iteritems(self.socket_keepalive_options):
- sock.setsockopt(socket.SOL_TCP, k, v)
+ sock.setsockopt(socket.IPPROTO_TCP, k, v)
# set the socket_connect_timeout before we connect
sock.settimeout(self.socket_connect_timeout)