Use AF_INET if AF_UNIX isn't available (i.e. Windows)

This commit is contained in:
Jeremy Tan 2018-08-07 20:44:16 +10:00
parent 4c9692264f
commit faaff1d4ac

View File

@ -200,7 +200,11 @@ class SocketHTTPServer(HTTPServer, ThreadingMixIn):
multiprocess = False
allow_reuse_address = 1
try:
address_family = socket.AF_UNIX
except AttributeError:
address_family = socket.AF_INET
request_queue_size = 128