Skip to content

Commit

Permalink
fix: fixed OSC receiver port collisions
Browse files Browse the repository at this point in the history
  • Loading branch information
ShyAssassin committed Nov 13, 2023
1 parent 1e24e5a commit 7366ede
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions TrackingBackend/app/processes/osc.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,13 @@ def __init__(self, config: EyeTrackConfig):
self.main_config: EyeTrackConfig = config
self.endpoints = config.osc.endpoints
self.config: OSCConfig = config.osc
self.dispatcher: Dispatcher = Dispatcher()
self.server: ThreadingOSCUDPServer = ThreadingOSCUDPServer((self.config.address, self.config.receiver_port), self.dispatcher)
self.thread: threading.Thread = threading.Thread()
# FIXME: this is a hack
if self.config.enable_receiving:
self.dispatcher: Dispatcher = Dispatcher()
self.server: ThreadingOSCUDPServer = ThreadingOSCUDPServer(
(self.config.address, self.config.receiver_port), self.dispatcher
)
self.thread: threading.Thread = threading.Thread()

def __del__(self):
if self.thread.is_alive():
Expand Down

0 comments on commit 7366ede

Please sign in to comment.