Check if not None before calling .join()
This commit is contained in:
parent
2d9579945b
commit
f62ce30dbf
@ -164,8 +164,11 @@ class Session:
|
|||||||
self.ping_thread_event.set()
|
self.ping_thread_event.set()
|
||||||
self.next_salt_thread_event.set()
|
self.next_salt_thread_event.set()
|
||||||
|
|
||||||
self.ping_thread.join()
|
if self.ping_thread is not None:
|
||||||
self.next_salt_thread.join()
|
self.ping_thread.join()
|
||||||
|
|
||||||
|
if self.next_salt_thread is not None:
|
||||||
|
self.next_salt_thread.join()
|
||||||
|
|
||||||
self.ping_thread_event.clear()
|
self.ping_thread_event.clear()
|
||||||
self.next_salt_thread_event.clear()
|
self.next_salt_thread_event.clear()
|
||||||
|
Loading…
Reference in New Issue
Block a user