From 9652a282c6cb0168b573f8b77c644889415e516b Mon Sep 17 00:00:00 2001 From: TJ Porter Date: Wed, 17 Jan 2024 00:53:24 -0600 Subject: [PATCH] Fixed #219 [FIX] Fixed race condition causing intermittent crashes --- pyVoIP/networking/sock.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyVoIP/networking/sock.py b/pyVoIP/networking/sock.py index d390032..cfa7dc2 100644 --- a/pyVoIP/networking/sock.py +++ b/pyVoIP/networking/sock.py @@ -445,8 +445,11 @@ def _handle_incoming_message( if conn_id: self.sip.handle_new_connection(self.conns[conn_id]) - def run(self) -> None: + def start(self) -> None: self.bind((self.bind_ip, self.bind_port)) + super().start() + + def run(self) -> None: if self.mode == TransportMode.UDP: self._udp_run() else: