From f24d5ec0c90d3cca518a04f7702493edd78a9f38 Mon Sep 17 00:00:00 2001 From: falkTX Date: Mon, 6 Apr 2015 18:00:43 +0200 Subject: [PATCH] Use a random port for carla-control --- source/carla_control.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/carla_control.py b/source/carla_control.py index f6a894c2b..047487de7 100755 --- a/source/carla_control.py +++ b/source/carla_control.py @@ -29,6 +29,8 @@ from liblo import send as lo_send from liblo import TCP as LO_TCP from liblo import UDP as LO_UDP +from random import random + # ------------------------------------------------------------------------------------------------------------ # Global liblo objects @@ -137,7 +139,7 @@ class CarlaHostOSC(CarlaHostQtPlugin): class CarlaControlServerThread(ServerThread): def __init__(self, host, mode): - ServerThread.__init__(self, 8087, mode) + ServerThread.__init__(self, 8998 + int(random()*9000), mode) self.host = host