Skip to content

Commit

Permalink
Merge pull request #1130 from Junnplus/socket-patch
Browse files Browse the repository at this point in the history
Use IPPROTO_TCP constant instead of SOL_TCP constant
  • Loading branch information
andymccurdy committed Feb 1, 2019
2 parents 6155774 + d2503b4 commit ff17e92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redis/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ def _connect(self):
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)
Expand Down

0 comments on commit ff17e92

Please sign in to comment.