Browse Source

Use a random port for carla-control

tags/1.9.7
falkTX 10 years ago
parent
commit
f24d5ec0c9
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      source/carla_control.py

+ 3
- 1
source/carla_control.py View File

@@ -29,6 +29,8 @@ from liblo import send as lo_send
from liblo import TCP as LO_TCP from liblo import TCP as LO_TCP
from liblo import UDP as LO_UDP from liblo import UDP as LO_UDP


from random import random

# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Global liblo objects # Global liblo objects


@@ -137,7 +139,7 @@ class CarlaHostOSC(CarlaHostQtPlugin):


class CarlaControlServerThread(ServerThread): class CarlaControlServerThread(ServerThread):
def __init__(self, host, mode): def __init__(self, host, mode):
ServerThread.__init__(self, 8087, mode)
ServerThread.__init__(self, 8998 + int(random()*9000), mode)


self.host = host self.host = host




Loading…
Cancel
Save