提交 5e16f95e 编写于 作者: T TeslaZhao

House cleaning

上级 12ab1380
......@@ -39,7 +39,7 @@ class AvailablePortGenerator(object):
def port_is_available(port):
with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as sock:
sock.settimeout(2)
result = sock.connect_ex(('0.0.0.0', port))
result = sock.connect_ex(('127.0.0.1', port))
if result != 0:
return True
else:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册