mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-25 02:52:07 +00:00
Have apiclient timeout if IO hangs up
This commit is contained in:
parent
ec54ecc9cd
commit
430b24081c
@ -356,6 +356,7 @@ class HTTPSClient(client.HTTPConnection, object):
|
||||
def connect(self):
|
||||
addrinf = socket.getaddrinfo(self.host, self.port)[0]
|
||||
psock = socket.socket(addrinf[0])
|
||||
psock.settimeout(15)
|
||||
psock.connect(addrinf[4])
|
||||
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
|
||||
ctx.load_verify_locations('/etc/confluent/ca.pem')
|
||||
|
Loading…
Reference in New Issue
Block a user