diff --git a/lib/model/sdp/connection.py b/lib/model/sdp/connection.py index ff2590db8..5a704582b 100644 --- a/lib/model/sdp/connection.py +++ b/lib/model/sdp/connection.py @@ -888,7 +888,8 @@ def _setup_listener(self): self.__receive_thread.start() def _close(self): - self.logger.debug(f'stopping receive thread {self.__receive_thread.name}') + if self.__receive_thread is not None: + self.logger.debug(f'stopping receive thread {self.__receive_thread.name}') self._listener_active = False try: self.__receive_thread.join()