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