diff options
author | Théo de la Hogue | 2022-11-02 11:52:22 +0100 |
---|---|---|
committer | Théo de la Hogue | 2022-11-02 11:52:22 +0100 |
commit | 42fc63050f2949005c31182c781c00ccaca20abd (patch) | |
tree | 9fc6414854cfc1edc46fbb4c3b4f06bb2cfead87 /src | |
parent | f7e2875ef14d96164f7b795360365c2fccbafa74 (diff) | |
parent | 4535c7e57492a9d9ba4ddf3c1767fe85c3e4c2bc (diff) | |
download | argaze-42fc63050f2949005c31182c781c00ccaca20abd.zip argaze-42fc63050f2949005c31182c781c00ccaca20abd.tar.gz argaze-42fc63050f2949005c31182c781c00ccaca20abd.tar.bz2 argaze-42fc63050f2949005c31182c781c00ccaca20abd.tar.xz |
Merging master
Diffstat (limited to 'src')
-rw-r--r-- | src/argaze/TobiiGlassesPro2/TobiiData.py | 4 | ||||
-rw-r--r-- | src/argaze/TobiiGlassesPro2/TobiiVideo.py | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/argaze/TobiiGlassesPro2/TobiiData.py b/src/argaze/TobiiGlassesPro2/TobiiData.py index 903dcc7..95fa947 100644 --- a/src/argaze/TobiiGlassesPro2/TobiiData.py +++ b/src/argaze/TobiiGlassesPro2/TobiiData.py @@ -315,7 +315,9 @@ class TobiiDataStream(threading.Thread): def __del__(self): """Stop data reception before destruction.""" - self.close() + if self.is_alive(): + + self.close() def __keep_alive(self): """Maintain connection.""" diff --git a/src/argaze/TobiiGlassesPro2/TobiiVideo.py b/src/argaze/TobiiGlassesPro2/TobiiVideo.py index c7901f3..82ee429 100644 --- a/src/argaze/TobiiGlassesPro2/TobiiVideo.py +++ b/src/argaze/TobiiGlassesPro2/TobiiVideo.py @@ -152,7 +152,9 @@ class TobiiVideoStream(threading.Thread): def __del__(self): """Stop data reception before destruction.""" - self.close() + if self.is_alive(): + + self.close() def __keep_alive(self): """Maintain connection.""" |