Set ConnectionServer default ip for tests based on ip_type

This commit is contained in:
shortcutme 2019-01-20 16:16:55 +01:00
parent 3fa0f1b9e8
commit f7d3718457
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 6 additions and 0 deletions

View File

@ -20,6 +20,12 @@ from Site import SiteManager
class ConnectionServer(object):
def __init__(self, ip=None, port=None, request_handler=None):
if not ip:
if config.fileserver_ip_type == "ipv6":
ip = "::1"
else:
ip = "127.0.0.1"
port = 15441
self.ip = ip
self.port = port
self.last_connection_id = 1 # Connection id incrementer