From a6d2be2e827097fcd89d7759d677e420723cb607 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Sun, 7 Jun 2015 06:22:50 -0300 Subject: events server can also run on random port With this last change, it is now possible to run more than one user agent on same pc without docker. With a fixed one it would raise port already in use and it is not configurable, making it impossible to run multiple activist UA. --- service/pixelated/config/leap.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'service/pixelated') diff --git a/service/pixelated/config/leap.py b/service/pixelated/config/leap.py index 0bdc91d5..f13a3fc7 100644 --- a/service/pixelated/config/leap.py +++ b/service/pixelated/config/leap.py @@ -1,4 +1,5 @@ from __future__ import absolute_import +import random from pixelated.config import credentials from leap.common.events import server as events_server import pixelated.bitmask_libraries.certs as certs @@ -13,7 +14,7 @@ def initialize_leap(leap_provider_cert, init_monkeypatches() provider, user, password = credentials.read(organization_mode, credentials_file) init_leap_cert(leap_provider_cert, leap_provider_cert_fingerprint) - events_server.ensure_server(port=8090) + events_server.ensure_server(random.randrange(8000, 11999)) leap_session = create_leap_session(provider, user, password, leap_home) leap_session.start_background_jobs() return leap_session -- cgit v1.2.3