fix last failing test -- make account.shutdown() robust against getting called from event thread

This commit is contained in:
holger krekel
2020-05-22 15:12:55 +02:00
parent 23ceda5ad9
commit 229606fcc5
3 changed files with 14 additions and 2 deletions

View File

@@ -147,6 +147,10 @@ class EventThread(threading.Thread):
self._thread_quitflag = True
if wait:
if self == threading.current_thread():
# we are in the callback thread and thus cannot
# wait for the thread-loop to finish.
return
self.join()
def run(self):