mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Better fix for IPv6 binding to localhost
This commit is contained in:
parent
41541a4385
commit
660bff01da
@ -180,7 +180,7 @@ class LoopTest(BaseTest):
|
|||||||
def test_ssl(self):
|
def test_ssl(self):
|
||||||
'Test serving over SSL'
|
'Test serving over SSL'
|
||||||
s = socket.socket(socket.AF_INET6, socket.SOCK_STREAM, 0)
|
s = socket.socket(socket.AF_INET6, socket.SOCK_STREAM, 0)
|
||||||
s.bind(('localhost', 1338 if is_travis else 0))
|
s.bind(('::1', 0))
|
||||||
address = s.getsockname()[0]
|
address = s.getsockname()[0]
|
||||||
with TemporaryDirectory('srv-test-ssl') as tdir:
|
with TemporaryDirectory('srv-test-ssl') as tdir:
|
||||||
cert_file, key_file, ca_file = map(lambda x:os.path.join(tdir, x), 'cka')
|
cert_file, key_file, ca_file = map(lambda x:os.path.join(tdir, x), 'cka')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user