Fix typo in socket attribute name
The proper attribute name is 'IPPROTO_TCP', not 'IPROTO_TCP'. This would lead to an AttributeError since socket does not have an attribute named 'IPROTO_TCP'. Change-Id: Ibd3c1e8d48ae57994d023bf18dd53a298466f6cb Closes-Bug: 1430935
This commit is contained in:
parent
876a3bd80a
commit
689a884e18
@ -51,7 +51,7 @@ class TCPKeepAliveAdapter(adapters.HTTPAdapter):
|
||||
def init_poolmanager(self, *args, **kwargs):
|
||||
if requests.__version__ >= '2.4.1':
|
||||
kwargs.setdefault('socket_options', [
|
||||
(socket.IPROTO_TCP, socket.TCP_NODELAY, 1),
|
||||
(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1),
|
||||
(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),
|
||||
])
|
||||
super(TCPKeepAliveAdapter, self).init_poolmanager(*args, **kwargs)
|
||||
|
Loading…
x
Reference in New Issue
Block a user