Check if not None before calling .join()

This commit is contained in:
Dan 2017-12-26 01:19:38 +01:00
parent 2d9579945b
commit f62ce30dbf

View File

@ -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()