Skip to content

Commit

Permalink
Check for listener thread liveness
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph2 committed Sep 11, 2022
1 parent 4e778f1 commit 4b83b81
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pyxcp/transport/base.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import abc
import pyxcp.types as types
import threading
from collections import deque
from datetime import datetime
from pyxcp.config import Configuration
from time import get_clock_info
from time import sleep
from time import time

import pyxcp.types as types
from ..logger import Logger
from ..timing import Timing
from ..utils import flatten
from ..utils import hexDump
from ..utils import time_perfcounter_correlation
from pyxcp.config import Configuration


class Empty(Exception):
Expand Down Expand Up @@ -123,7 +123,8 @@ def connect(self):
pass

def startListener(self):
self.listener.start()
if not self.listener.is_alive():
self.listener.start()

def finishListener(self):
if hasattr(self, "closeEvent"):
Expand Down

0 comments on commit 4b83b81

Please sign in to comment.